Unary normal forms without pruning
Lax369799.FiniteNormalForms · concepts/Lax369799/FiniteNormalForms.lean · lax-369799
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
Evaluate the unpruned unary pieces of a context. Together with the hole's planted root flag and loop directions, these values describe a normal context whose evaluation is the planted evaluation of the original.
Concept map
Lean source view on GitHub
| 1 | import Lax369799.FiniteDecomposition |
| 2 | import Lax369799.ExtremalContexts |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Unary normal forms without pruning |
| 7 | type: theorem |
| 8 | --- |
| 9 | Evaluate the unpruned unary pieces of a context. Together with the hole's |
| 10 | planted root flag and loop directions, these values describe a normal |
| 11 | context whose evaluation is the planted evaluation of the original. |
| 12 | -/ |
| 13 | namespace Lax369799.FiniteNormalForms |
| 14 | open RankedSystems (RankedSet Presentation) |
| 15 | open Flattening (WithHole IsHole) |
| 16 | open FinitePresentations FiniteContexts FiniteDecomposition FiniteSyntacticAlgebra |
| 17 | |
| 18 | /-- The label of a non-hole vertex is an ordinary letter of the same rank. -/ |
| 19 | noncomputable def ordinaryLetter {A : RankedSet} {k : ℕ} (C : Context A k 0) |
| 20 | (v : BodyVertex C) : |
| 21 | {a : A (C.system.graph.label v.val).1 // (C.system.graph.label v.val).2 = Sum.inl a} := by |
| 22 | cases h : (C.system.graph.label v.val).2 with |
| 23 | | inl a => exact ⟨a, rfl⟩ |
| 24 | | inr hkr => |
| 25 | have hv : IsHole (C.system.graph.label v.val) := ⟨hkr, h⟩ |
| 26 | exact False.elim (v.property ((Classical.choose_spec C.one_hole).2 v.val hv)) |
| 27 | |
| 28 | noncomputable def ordinaryPiece {A : RankedSet} {k : ℕ} (C : Context A k 0) |
| 29 | (i : Fin (k + 1)) : Presentation A 1 (BodyVertex C) where |
| 30 | label := fun v => ⟨(C.system.graph.label v.val).1, (ordinaryLetter C v).val⟩ |
| 31 | initial := (piece C i).initial |
| 32 | root := (piece C i).root |
| 33 | edge := (piece C i).edge |
| 34 | direction_valid := (piece C i).direction_valid |
| 35 | |
| 36 | noncomputable def pieceValue {A : RankedSet} (E : Algebra A) {k : ℕ} |
| 37 | (C : Context A k 0) (i : Fin (k + 1)) : A 1 := by |
| 38 | classical |
| 39 | exact E.eval 1 (enumerate (ordinaryPiece C i)) |
| 40 | |
| 41 | noncomputable def plantedBoundary {A : RankedSet} {k : ℕ} (C : Context A k 0) : |
| 42 | ExtremalContexts.Boundary k where |
| 43 | root := (boundary C).initial ∨ (boundary C).root |
| 44 | loops := (boundary C).loops |
| 45 | |
| 46 | def normalContext {A : RankedSet} {k : ℕ} (B : ExtremalContexts.Boundary k) |
| 47 | (m : Fin (k + 1) → A 1) : Context A k 0 := |
| 48 | ⟨ofSetSystem (ExtremalContexts.normalContext B m).system, |
| 49 | (ExtremalContexts.normalContext B m).one_hole⟩ |
| 50 | |
| 51 | axiom algebraic_decomposition {A : RankedSet} (E : Algebra A) |
| 52 | (hcover : ∀ n (S T : FiniteSystem A n) (f : PresentationCovers.Cover S.graph T.graph), |
| 53 | Function.Surjective f.toFun → E.eval n S = E.eval n T) |
| 54 | {k : ℕ} (C : Context A k 0) (a : A k) : |
| 55 | E.eval 0 (plug (normalContext (plantedBoundary C) (pieceValue E C)) (atomic a)) = |
| 56 | E.eval 0 (plant (plug C (atomic a))) |
| 57 | |
| 58 | end Lax369799.FiniteNormalForms |
| 59 |
Used by
From Mathlib
none
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments