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

Normalisation of values

Lax149335.ValueNormalisation · concepts/Lax149335/ValueNormalisation.lean · lax-149335

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

    Lemma 5.3 (Normalisation of values). Every value 1→A1 \to A is provably equivalent to a value built from the identity on 11 using the following constructors: v;Leftv \mathbin{;} \mathsf{Left} and v;Rightv \mathbin{;} \mathsf{Right} for values of co-products, (v,w)(v, w) for values of products, and v⋅wv \cdot w, [v][v] and [ ][\,] for values of list types.

    Concept map
    5 concepts
    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 Lax149335.EquationalTheory
    2
    3/-!
    4---
    5title: Normalisation of values
    6type: lemma
    7---
    8**Lemma 5.3 (Normalisation of values).** Every value 1→A1 \to A is provably equivalent to a
    9value built from the identity on 11 using the following constructors: v;Leftv \mathbin{;} \mathsf{Left}
    10 and v;Rightv \mathbin{;} \mathsf{Right} for values of co-products, (v,w)(v, w) for
    11values of products, and v⋅wv \cdot w, [v][v] and [ ][\,] for values of list types.
    12-/
    13
    14namespace Lax149335.ValueNormalisation
    15
    16open Lax149335.Types Lax149335.Terms Lax149335.Terms.Term Lax149335.DerivedTerms
    17 Lax149335.DerivedTerms.Term Lax149335.EquationalTheory
    18
    19/-- Values in normal form. -/
    20inductive NormalValue : {A : Ty} → Value A → Prop
    21 /-- The identity on the unit type. -/
    22 | id : NormalValue (Term.id Ty.unit)
    23 /-- A co-product value `v; Left`. -/
    24 | inl {A B : Ty} {v : Value A} : NormalValue v → NormalValue (v ⨟ Term.inl A B)
    25 /-- A co-product value `v; Right`. -/
    26 | inr {A B : Ty} {v : Value B} : NormalValue v → NormalValue (v ⨟ Term.inr A B)
    27 /-- A product value `(v, w)`. -/
    28 | pair {A B : Ty} {v : Value A} {w : Value B} :
    29 NormalValue v → NormalValue w → NormalValue (pairR v w)
    30 /-- The concatenation `v · w` of two list values. -/
    31 | dot {A : Ty} {v w : Value A⋆} : NormalValue v → NormalValue w → NormalValue (dotL v w)
    32 /-- A singleton list value `[v]`. -/
    33 | sing {A : Ty} {v : Value A} : NormalValue v → NormalValue (sing v)
    34 /-- The empty list value `[]`. -/
    35 | nil {A : Ty} : NormalValue (nilT A)
    36
    37/-- **Lemma 5.3.** Every value is provably equivalent to a value in normal form. -/
    38axiom normalisation_of_values {A : Ty} (v : Value A) : ∃ u : Value A, NormalValue u ∧ v ≡ₜ u
    39
    40end Lax149335.ValueNormalisation
    41
    Show Proof
    Builds on
    Used by

    none

    From Mathlib

    none

    Discussion

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

    Loading discussion…