Documentation

ISAR.CanonicalRepresentative

Canonical representatives via complete development #

Representative selection for OperEq-classes should be given by the complete-development function cd (iterated as cd_loop_fuel) on the HasNF fragment, not by unconstrained choice of a dummy. Unique normal forms make that choice well-defined. For non-WN terms, nf_of_term falls back to Quotient.exists_rep choice (still OperEq-related).

One complete-development step, packed as an ISKSubtype.

Equations
Instances For

    Fuelled complete development as an explicit choice function on terms.

    Equations
    Instances For

      Linear fragment: enough fuel is term_size, and the result is a normal form.

      Equations
      Instances For
        theorem ISAR.IRed_of_OperEq_normal {t n : ISKSubtype} (h : OperEq n t) (hn : NormalI n.val) :
        theorem ISAR.canonical_nf_unique {t u : ISKSubtype} (ht : LinearIKTerm t.val) (hu : LinearIKTerm u.val) (h : OperEq t u) :

        OperEq-classes share a unique normal form; canonical_nf is that representative.

        OperEq between a fuelled development and the original term — the representative theorem used by computable kernels (ComputableISAR_Kernel).

        Under HasNF, the AC nf_of_term representative is OperEq-related to t.

        Linear terms always have a normal form via canonical_nf.

        Fuelled section on concrete terms (fully computable; no quotient out).

        Equations
        Instances For

          Unrestricted coherence of canonical_rep: always OperEq-related to the class. Proved once nf_of_term uses NF when available and a class representative via Quotient.exists_rep otherwise (never the old false ⟨norm,_⟩ fallback). Preferred explicit section on the linear fragment remains canonical_nf / cd_loop_fuel.

          Finite cd as a unique section — and the ¬SN obstruction #

          HasNF is weak normalization: some IRed sequence hits a unique NF (confluence). SKI is not SN, so term_size is not a fuel bound once can grow. Iterated cd is still a normalizing strategy: a length-indexed strip against complete development shows that any parallel chain to an NF yields a fuel for cd_loop_fuel. For ¬HasNF, no fuel yields NormalI (expected: SKI is not SN); that is not a gap. nf_of_term remains the AC section used by canonical_rep (Classical.choose on HasNF, exists_rep otherwise) and is not claimed computable. The linear fragment additionally gives an explicit bound term_size.

          inductive ISAR.ParN :
          NatITermITermProp

          Length-indexed parallel reduction (head form, for induction on the first step).

          Instances For
            theorem ISAR.ParStep_eq_of_NormalI {n u : ITerm} (hn : NormalI n) (h : ParStep n u) :
            n = u
            theorem ISAR.ParN_trans {k m : Nat} {t u v : ITerm} (h1 : ParN k t u) (h2 : ParN m u v) :
            ParN (k + m) t v
            theorem ISAR.ParN_single {t u : ITerm} (h : ParStep t u) :
            ParN 1 t u
            theorem ISAR.ParN_strip {k : Nat} {t u n : ITerm} (h : ParStep t u) (p : ParN k t n) :
            (n' : ITerm), ParN k u n' ParStep n n'

            Diamond strip: one parallel step vs a k-chain, length preserved.

            theorem ISAR.cd_loop_fuel_eq_of_cd_eq (fuel : Nat) (t : ISKSubtype) (h : t.val = cd t.val) :
            cd_loop_fuel fuel t = t
            theorem ISAR.cd_loop_fuel_normal_of_ParN (t : ISKSubtype) (n : ITerm) (k : Nat) (p : ParN k t.val n) (hn : NormalI n) :

            Gross–Knuth: a parallel chain of length k to an NF is fuel for cd_loop_fuel.

            HasNF classes have a unique normal-form representative.

            Any fuel that lands on a normal form is a HasNF witness.

            Obstruction: if there is no NF, finite complete development never produces one.

            Weak normalization iff some finite iterate of cd is a normal form.

            Linear fragment: same iff, with explicit fuel term_size.

            On the linear fragment the fuelled section is the unique NF.

            Under HasNF, some fuel of cd is the unique NF (not merely some NF).

            Explicit Gross–Knuth section: the fuel is a parameter, not a chosen NF.

            Equations
            Instances For
              noncomputable def ISAR.nf_of_HasNF (t : ISKSubtype) (ht : HasNF t) :

              Computational HasNF section: choice picks fuel, then the representative is cd_loop_fuel. Still not a computable nf_of_term; that AC section is what canonical_rep uses. ¬HasNF remains exists_rep there (expected, not a gap).

              Equations
              Instances For