One amplification round on a fixed affine host
Lax956329.OneRound · concepts/Lax956329/OneRound.lean · lax-956329
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Lemma
The input and output both contain the four forward affine generators, their inverses and two identity ports. The algorithm prepends one fixed radix, preserves perfect completeness, and doubles the gap up to a fixed cutoff. All constants are independent of the input modulus.
Concept map
Evidence
Each proof establishes this claim relative to its assumptions.
Lean source view on GitHub
| 1 | import Lax956329.Amplification |
| 2 | import Mathlib.Algebra.Group.Fin.Basic |
| 3 | import Mathlib.Logic.Equiv.Fin.Basic |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: One amplification round on a fixed affine host |
| 8 | type: lemma |
| 9 | --- |
| 10 | The input and output both contain the four forward affine generators, their |
| 11 | inverses and two identity ports. The algorithm prepends one fixed radix, |
| 12 | preserves perfect completeness, and doubles the gap up to a fixed cutoff. |
| 13 | All constants are independent of the input modulus. |
| 14 | -/ |
| 15 | |
| 16 | namespace Lax956329.OneRound |
| 17 | |
| 18 | open Hierarchy Amplification Instances Lax434930.PolynomialTime |
| 19 | |
| 20 | /-- A modular shear with a constant translation in the first coordinate. -/ |
| 21 | def shear (m : ℕ) [NeZero m] (k c : ℕ) : Equiv.Perm (Owner m) where |
| 22 | toFun z := (z.1+Fin.ofNat m (k*z.2.val+c),z.2) |
| 23 | invFun z := (z.1-Fin.ofNat m (k*z.2.val+c),z.2) |
| 24 | left_inv z := Prod.ext (add_sub_cancel_right ..) rfl |
| 25 | right_inv z := Prod.ext (sub_add_cancel ..) rfl |
| 26 | |
| 27 | def vertical (m : ℕ) [NeZero m] (k c : ℕ) : Equiv.Perm (Owner m) := |
| 28 | ((Equiv.prodComm _ _).trans (shear m k c)).trans (Equiv.prodComm _ _) |
| 29 | |
| 30 | def forward (i : Fin 10) : Port := finSumFinEquiv (Sum.inl i : Fin 10 ⊕ Fin 10) |
| 31 | |
| 32 | def backward (i : Fin 10) : Port := finSumFinEquiv (Sum.inr i : Fin 10 ⊕ Fin 10) |
| 33 | |
| 34 | def Affine {b : ℕ} (S : System b) : Prop := |
| 35 | letI : NeZero S.m := ⟨S.positive.ne'⟩ |
| 36 | (∀ i, S.reverse (forward i) = backward i) ∧ |
| 37 | S.move (forward 2) = shear S.m 2 0 ∧ S.move (forward 3) = shear S.m 2 1 ∧ |
| 38 | S.move (forward 4) = vertical S.m 2 0 ∧ S.move (forward 5) = vertical S.m 2 1 ∧ |
| 39 | S.move (forward 9) = Equiv.refl _ |
| 40 | |
| 41 | /-- A single uniform local construction, with its modulus and new first digit specified. -/ |
| 42 | axiom construct : ∃ b t s : ℕ, 4 ≤ b ∧ 0 < t ∧ 0 < s ∧ ∃ f : Word → Word, Poly f ∧ |
| 43 | ∀ S : System b, Affine S → ∃ T : System b, |
| 44 | f S.bits = T.bits ∧ Affine T ∧ T.m = s*S.m ∧ T.radices = s :: S.radices ∧ |
| 45 | (S.satisfied → T.satisfied) ∧ |
| 46 | ∀ g : ℝ, 0 ≤ g → LowerBound S g → LowerBound T (2 * min g (1 / (t : ℝ))) |
| 47 | |
| 48 | end Lax956329.OneRound |
| 49 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments