While this submission is a draft, it cannot be used by other submissions.

Occurrence types and the enlarged hierarchy

Lax956329.OccurrenceLayout · concepts/Lax956329/OccurrenceLayout.lean · lax-956329

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Lemma

    Each occurrence type has a fixed route from the starting vertex of its test to its owner. Local equality edges only change the type. The matching goes back along the first route and forward along its partner's route. Both operations preserve the enlarged hierarchy, including when two owners coincide.

    Concept map
    12 concepts; 3 descendants hidden
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A
    Evidence

    Each proof establishes this claim relative to its assumptions.

    Lean source view on GitHub

    1import Lax956329.OneRound
    2
    3/-!
    4---
    5title: Occurrence types and the enlarged hierarchy
    6type: lemma
    7---
    8Each occurrence type has a fixed route from the starting vertex of its test
    9to its owner. Local equality edges only change the type. The matching goes
    10back along the first route and forward along its partner's route. Both
    11operations preserve the enlarged hierarchy, including when two owners coincide.
    12-/
    13
    14namespace Lax956329.OccurrenceLayout
    15
    16open Hierarchy OneRound
    17
    18structure Pattern (s : ℕ) where
    19 localMove : Fin 4 → Equiv.Perm (Owner s)
    20 mate : Equiv.Perm (Owner s)
    21 paired : Function.Involutive mate
    22 route : Owner s → List Port
    23
    24def walk {b : ℕ} (S : System b) : List Port → Equiv.Perm (Owner S.m)
    25 | [] => Equiv.refl _
    26 | i :: is => (S.move i).trans (walk S is)
    27
    28/-- A low coordinate gives the occurrence type, and the high coordinate gives its owner. -/
    29def number (s m : ℕ) : Owner s × Owner m ≃ Owner (s*m) :=
    30 let c : Fin m × Fin s ≃ Fin (s*m) := finProdFinEquiv.trans (finCongr (Nat.mul_comm m s))
    31 { toFun := fun (a,u) => (c (u.1,a.1),c (u.2,a.2))
    32 invFun := fun z => (((c.symm z.1).2,(c.symm z.2).2),((c.symm z.1).1,(c.symm z.2).1))
    33 left_inv := by rintro ⟨⟨a,b⟩,⟨u,v⟩⟩; simp
    34 right_inv := by rintro ⟨u,v⟩; simp }
    35
    36/-- The four local, four global, matching and identity generators are followed by their inverses. -/
    37def locals : Fin 4 → Fin 10 := ![0,1,6,7]
    38
    39axiom layout {b s : ℕ} (S : System b) (P : Pattern s) (hs : 0 < s) (branch : s*s ≤ b)
    40 (test : Owner s → Owner S.m → Label → Label → Bool) :
    41 ∃ T : System b, ∃ eq : T.m = s*S.m,
    42 T.radices = s :: S.radices ∧ Affine T ∧
    43 let e := (number s S.m).trans ((finCongr eq.symm).prodCongr (finCongr eq.symm))
    44 (∀ i a u, T.move (forward (locals i)) (e (a,u)) = e (P.localMove i a,u)) ∧
    45 (∀ a u, T.move (forward 8) (e (a,u)) =
    46 e (P.mate a,walk S (P.route (P.mate a)) ((walk S (P.route a)).symm u))) ∧
    47 (∀ i a u c d, T.accept (forward (locals i)) (e (a,u)) c d = decide (c=d)) ∧
    48 (∀ a u c d, T.accept (forward 8) (e (a,u)) c d = test a u c d) ∧
    49 (∀ i : Fin 10, (∀ j, locals j ≠ i) → i ≠ 8 → ∀ v c d, T.accept (forward i) v c d = true)
    50
    51end Lax956329.OccurrenceLayout
    52
    Show Proof
    Builds on
    Used by
    From Mathlib

    none

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…