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

Relabelling and deterministic context substitution

Lax369799.ContextRelabelling · concepts/Lax369799/ContextRelabelling.lean · lax-369799

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

    Theorem

    Relabelling ordinary letters preserves the unique hole. It commutes with substitution, and plugging a deterministic system into a deterministic context gives a deterministic system.

    Concept map
    8 concepts
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on ADescendants are omitted for concepts with more than 10 descendants.
    Evidence

    This concept declares 3 statements. Each proof establishes one of them relative to its assumptions.

    Lean source view on GitHub

    1import Lax369799.SystemEvaluation
    2
    3/-!
    4---
    5title: Relabelling and deterministic context substitution
    6type: theorem
    7---
    8Relabelling ordinary letters preserves the unique hole. It commutes with
    9substitution, and plugging a deterministic system into a deterministic
    10context gives a deterministic system.
    11-/
    12namespace Lax369799.ContextRelabelling
    13open RankedSystems Flattening
    14
    15def mapAlphabet {A B : RankedSet} (η : RankedMap A B) (k : ℕ) :
    16 RankedMap (WithHole A k) (WithHole B k) := fun r => Sum.map (η r) id
    17
    18def mapContext {A B : RankedSet} (η : RankedMap A B) {k n : ℕ}
    19 (C : SetContext A k n) : SetContext B k n where
    20 system := relabel (mapAlphabet η k) C.system
    21 one_hole := by
    22 have hi (v : C.system.Vertex) :
    23 IsHole ((relabel (mapAlphabet η k) C.system).graph.label v) ↔
    24 IsHole (C.system.graph.label v) := by
    25 change (∃ h, Sum.map (η _) id (C.system.graph.label v).2 = Sum.inr h) ↔
    26 ∃ h, (C.system.graph.label v).2 = Sum.inr h
    27 cases (C.system.graph.label v).2 <;> simp
    28 obtain ⟨v, hv, hu⟩ := C.one_hole
    29 exact ⟨v, (hi v).mpr hv, fun w hw => hu w ((hi w).mp hw)⟩
    30
    31axiom relabel_plug {A B : RankedSet} (η : RankedMap A B) {k n : ℕ}
    32 (C : SetContext A k n) (S : SetSystem A k) :
    33 relabel η (plug C S) = plug (mapContext η C) (relabel η S)
    34
    35axiom plug_system {A : RankedSet} {k n : ℕ}
    36 (C : SetContext A k n) (hC : C.system.Deterministic) (S : System A k) :
    37 ∃ U : System A n, U.val = plug C S.val
    38
    39axiom evaluation_congruence {A B : RankedSet} (E : Algebras.Algebra B)
    40 (η : RankedMap A B) {k n : ℕ} (C : SetContext A k n) (hC : C.system.Deterministic)
    41 (S T : System A k) (U V : System A n)
    42 (hU : U.val = plug C S.val) (hV : V.val = plug C T.val)
    43 (h : E.eval k (relabelSystem η S) = E.eval k (relabelSystem η T)) :
    44 E.eval n (relabelSystem η U) = E.eval n (relabelSystem η V)
    45
    46end Lax369799.ContextRelabelling
    47
    Show ProofShow ProofShow Proof

    Discussion

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

    Loading discussion…