Documentation

CategorialAlgebras.HepDerivor.Comparison

Comparisons between transformed algebras #

Defined term values in a transformed algebra translate to defined values in the original algebra. Successive transformations therefore include naturally in the transformation by the composite. Identity transformations and transformations selecting the same cells are identified by maps acting identically on underlying elements.

theorem CategorialAlgebras.Term.partialEval_substFamily_of_mem {S : Type u} {R : Type z} {sig : Signature S} {X : S → Type x} {φ : R → S} {a : List R} {B : PartialAlgebra sig} (q : Word.Family (fun (r : R) => Term sig X (φ r)) a) (b : SortedSet.Map X B.carrier) (r : Word.Family (fun (s : R) => B.carrier (φ s)) a) (hq : ∀ (j : Fin a.length), r j ∈ partialEval b (q j)) {s : S} (p : Term sig (Word.MappedVariables φ a) s) :

Evaluation of a family substitution agrees with evaluation at any family realizing its substituted terms.

Invertibility and ep-algebra structure #

theorem CategorialAlgebras.HepSignature.isIso_of_bijective {S : Type u} (sig : HepSignature S) {A B : PartialAlgebra sig.symbol} (hA : sig.IsEPAlgebra A) (hB : sig.IsWeakEPAlgebra B) (f : A ⟶ B) (hf : ∀ (s : S), Function.Bijective (f.toMap s)) :

A bijective homomorphism from an ep-algebra to a weak ep-algebra is invertible. Hierarchical induction reflects domain satisfaction through the inverse mapping.

theorem CategorialAlgebras.EPSignature.isEPAlgebra_of_iso {S : Type u} (sig : EPSignature S) {A B : PartialAlgebra sig.symbol} (e : A ≅ B) (hA : sig.IsEPAlgebra A) :

Ep-algebra structure is invariant under a partial-algebra isomorphism.

Translation of defined values and equations #

theorem CategorialAlgebras.GeneralizedHepDerivor.partialEval_translate {S : Type u} {T : Type u'} {sig : HepSignature S} {tau : HepSignature T} (c : GeneralizedHepDerivor sig tau) (B : PartialAlgebra tau.symbol) {X : S → Type x} {Y : T → Type y} (a : SortedSet.Map X (c.Cell B)) (b : SortedSet.Map Y B.carrier) (f : (s : S) → X s → Term tau.symbol Y (c.sortMap s)) (hf : ∀ (s : S) (x : X s), ↑(a s x) ∈ Term.partialEval b (f s x)) {s : S} (p : Term sig.symbol X s) {q : c.Cell B s} (hq : q ∈ Term.partialEval a p) :

Every defined transformed term value is a value of its translated term. The variable assignment may itself consist of arbitrary defined target terms.

Formally stronger than the informal statement. Informally, it is stated for terms in the positional variables of a word and families of cells; here it holds for any sorted set of variables and any assignment compatible with the translation.

theorem CategorialAlgebras.GeneralizedHepDerivor.partialEval_translateWord {S : Type u} {T : Type u'} {sig : HepSignature S} {tau : HepSignature T} (c : GeneralizedHepDerivor sig tau) (B : PartialAlgebra tau.symbol) (a : List S) (b : Word.Family (c.Cell B) a) {s : S} (p : Term sig.symbol (Word.Variables a) s) {q : c.Cell B s} (hq : q ∈ Term.partialEval (Word.valuation b) p) :
↑q ∈ Term.partialEval (Word.valuation fun (j : Fin a.length) => ↑(b j)) (c.translateWord a p)

Defined term values translate on the positional variables of any input word.

Satisfaction of positional existence equations implies satisfaction of their translated sorted set.

Singleton equations satisfied by cells hold after translation in the original algebra.

theorem CategorialAlgebras.GeneralizedHepDerivor.mem_op_of_imageValue {S : Type u} {T : Type u'} {sig : HepSignature S} {tau : HepSignature T} (c : GeneralizedHepDerivor sig tau) (B : PartialAlgebra tau.symbol) {A : PartialAlgebra sig.symbol} (hA : sig.IsWeakEPAlgebra A) (f : SortedSet.Map A.carrier (c.Cell B)) (hf : ∀ {a : List S} {s : S} (σ : sig.symbol a s) (b : Word.Family A.carrier a) {q : A.carrier s}, q ∈ A.op σ b → ↑(f s q) ∈ c.imageValue B σ fun (j : Fin a.length) => f (a.get j) (b j)) {a : List S} {s : S} (σ : sig.symbol a s) (b : Word.Family A.carrier a) {q : A.carrier s} (hq : q ∈ A.op σ b) :
f s q ∈ (c.transformed B).op σ fun (j : Fin a.length) => f (a.get j) (b j)

A map from a weak ep-algebra to cells preserves transformed operations provided it preserves the values of all interpreting terms.

Dependence on selected cells #

@[reducible, inline]

A generalized hep-derivor reconstructed from an underlying derivor and domains.

Equations
Instances For
    noncomputable def CategorialAlgebras.GeneralizedHepDerivor.sameCellsHom {S : Type u} {T : Type u'} {sig : HepSignature S} {tau : HepSignature T} (c : Derivor sig.symbol tau.symbol) (D D' : (s : S) → EEquationSet tau.symbol (Word.Variables [c.sortMap s])) (B : PartialAlgebra tau.symbol) (h : ∀ (s : S) (b : B.carrier ((withDomains c D).sortMap s)), (withDomains c D).IsCell B s b → (withDomains c D').IsCell B s b) :

    Equal selected cells for a common derivor give a homomorphism acting identically on the underlying elements. Only inclusion of the first cell set is required.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      noncomputable def CategorialAlgebras.GeneralizedHepDerivor.sameCellsIso {S : Type u} {T : Type u'} {sig : HepSignature S} {tau : HepSignature T} (c : Derivor sig.symbol tau.symbol) (D D' : (s : S) → EEquationSet tau.symbol (Word.Variables [c.sortMap s])) (B : PartialAlgebra tau.symbol) (h : ∀ (s : S) (b : B.carrier ((withDomains c D).sortMap s)), (withDomains c D).IsCell B s b ↔ (withDomains c D').IsCell B s b) :

      Domains selecting the same cells give isomorphic transformed algebras. Both directions are identities on underlying elements.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem CategorialAlgebras.GeneralizedHepDerivor.sameCellsIso_naturality {S : Type u} {T : Type u'} {sig : HepSignature S} {tau : HepSignature T} (c : Derivor sig.symbol tau.symbol) (D D' : (s : S) → EEquationSet tau.symbol (Word.Variables [c.sortMap s])) {B B' : PartialAlgebra tau.symbol} (f : B ⟶ B') (h : ∀ (s : S) (b : B.carrier ((withDomains c D).sortMap s)), (withDomains c D).IsCell B s b ↔ (withDomains c D').IsCell B s b) (h' : ∀ (s : S) (b : B'.carrier ((withDomains c D).sortMap s)), (withDomains c D).IsCell B' s b ↔ (withDomains c D').IsCell B' s b) :

        The identification of equal cells commutes with transformed homomorphisms.

        Formally weaker than the informal statement. Informally, the two induced homomorphisms are equal; here they commute with the isomorphisms that identify the two algebras.

        noncomputable def CategorialAlgebras.GeneralizedHepDerivor.sameCellsNatIso {S : Type u} {T : Type u'} {sig : HepSignature S} {tau : HepSignature T} (c : Derivor sig.symbol tau.symbol) (D D' : (s : S) → EEquationSet tau.symbol (Word.Variables [c.sortMap s])) (P : CategoryTheory.ObjectProperty (PartialAlgebra tau.symbol)) (h : ∀ (B : PartialAlgebra tau.symbol), P B → ∀ (s : S) (b : B.carrier ((withDomains c D).sortMap s)), (withDomains c D).IsCell B s b ↔ (withDomains c D').IsCell B s b) :

        Equal cell sets throughout a subcategory give a natural identification of its two transformed-algebra functors.

        Formally weaker than the informal statement. Informally, the two functors are equal; here the carriers of transformed algebras are subtypes of cells, so the equality becomes a natural isomorphism that is the identity on elements.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          noncomputable def CategorialAlgebras.GeneralizedHepDerivor.sameDerivorIso {S : Type u} {T : Type u'} {sig : HepSignature S} {tau : HepSignature T} (c c' : GeneralizedHepDerivor sig tau) (h : c.toDerivor = c'.toDerivor) (B : PartialAlgebra tau.symbol) (hc : ∀ (s : S) (b : B.carrier (c.sortMap s)), c.IsCell B s b ↔ c'.IsCell B s (cast ⋯ b)) :

          Equal underlying derivors and equal selected cells identify transformed algebras. The cast only changes the sort index along the equality of underlying derivors.

          Formally weaker than the informal statement. Informally, the two algebras are equal; here the carrier of a transformed algebra is a subtype of cells, so the equality becomes an isomorphism that is the identity on elements.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem CategorialAlgebras.GeneralizedHepDerivor.sameDerivorIso_naturality {S : Type u} {T : Type u'} {sig : HepSignature S} {tau : HepSignature T} (c c' : GeneralizedHepDerivor sig tau) (h : c.toDerivor = c'.toDerivor) {B B' : PartialAlgebra tau.symbol} (f : B ⟶ B') (hc : ∀ (s : S) (b : B.carrier (c.sortMap s)), c.IsCell B s b ↔ c'.IsCell B s (cast ⋯ b)) (hc' : ∀ (s : S) (b : B'.carrier (c.sortMap s)), c.IsCell B' s b ↔ c'.IsCell B' s (cast ⋯ b)) :

            The identification for equal underlying derivors commutes with all homomorphisms whose source and target have the same selected cells.

            noncomputable def CategorialAlgebras.GeneralizedHepDerivor.sameDerivorNatIso {S : Type u} {T : Type u'} {sig : HepSignature S} {tau : HepSignature T} (c c' : GeneralizedHepDerivor sig tau) (h : c.toDerivor = c'.toDerivor) (P : CategoryTheory.ObjectProperty (PartialAlgebra tau.symbol)) (hc : ∀ (B : PartialAlgebra tau.symbol), P B → ∀ (s : S) (b : B.carrier (c.sortMap s)), c.IsCell B s b ↔ c'.IsCell B s (cast ⋯ b)) :

            Equal derivors selecting the same cells throughout a subcategory induce naturally isomorphic restricted functors.

            Equations
            Instances For

              Identity reindexing #

              theorem CategorialAlgebras.GeneralizedHepDerivor.identity_imageValue {S : Type u} {sig : HepSignature S} (A : PartialAlgebra sig.symbol) {a : List S} {s : S} (σ : sig.symbol a s) (b : Word.Family ((identity sig).Cell A) a) :
              (identity sig).imageValue A σ b = A.op σ fun (j : Fin a.length) => ↑(b j)

              The interpreting term of the identity derivor is the basic partial operation.

              Forgetting the identity cell proof is a homomorphism on every partial algebra.

              Equations
              Instances For

                Every element belongs to the unrestricted identity cell set.

                Equations
                Instances For

                  Adding the identity cell proof preserves operations of a weak ep-algebra.

                  Equations
                  Instances For

                    Identity reindexing is isomorphic to the original weak ep-algebra by adding and removing cell proofs. These maps are identities on underlying elements.

                    Formally weaker than the informal statement. Informally, the two algebras are equal; here the carrier of a transformed algebra is a subtype of cells, so the equality becomes an isomorphism that is the identity on elements.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      The invertible unit of reindexing on weak ep-algebras. It expresses strict normality after identifying cell subtypes with their elements.

                      Formally weaker than the informal statement. Informally, the two functors are equal; here the carriers of transformed algebras are subtypes of cells, so the equality becomes a natural isomorphism that is the identity on elements.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        Identity transformation preserves ep-algebras.

                        Identity reindexing restricted and corestricted to ep-algebras.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For

                          The identity transformation induces the identity on ep-algebras up to the canonical identification of cell subtypes.

                          Formally weaker than the informal statement. Informally, the two functors are equal; here the carriers of transformed algebras are subtypes of cells, so the equality becomes a natural isomorphism that is the identity on elements.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            The composition comparison #

                            theorem CategorialAlgebras.GeneralizedHepDerivor.isCell_comp {S : Type u} {T : Type u'} {U : Type u''} {sig : HepSignature S} {tau : HepSignature T} {ups : HepSignature U} (c : GeneralizedHepDerivor sig tau) (d : GeneralizedHepDerivor tau ups) (C : PartialAlgebra ups.symbol) {s : S} (x : c.Cell (d.transformed C) s) :
                            (c.comp d).IsCell C s ↑↑x

                            A cell of successive transformations is a cell for the composite.

                            def CategorialAlgebras.GeneralizedHepDerivor.comparisonMap {S : Type u} {T : Type u'} {U : Type u''} {sig : HepSignature S} {tau : HepSignature T} {ups : HepSignature U} (c : GeneralizedHepDerivor sig tau) (d : GeneralizedHepDerivor tau ups) (C : PartialAlgebra ups.symbol) :
                            SortedSet.Map (c.Cell (d.transformed C)) ((c.comp d).Cell C)

                            The inclusion of iterated cells into composite cells.

                            Equations
                            Instances For
                              @[simp]
                              theorem CategorialAlgebras.GeneralizedHepDerivor.comparisonMap_val {S : Type u} {T : Type u'} {U : Type u''} {sig : HepSignature S} {tau : HepSignature T} {ups : HepSignature U} (c : GeneralizedHepDerivor sig tau) (d : GeneralizedHepDerivor tau ups) (C : PartialAlgebra ups.symbol) {s : S} (x : c.Cell (d.transformed C) s) :
                              ↑(c.comparisonMap d C s x) = ↑↑x

                              The comparison acts as the identity on underlying elements.

                              theorem CategorialAlgebras.GeneralizedHepDerivor.imageValue_comp {S : Type u} {T : Type u'} {U : Type u''} {sig : HepSignature S} {tau : HepSignature T} {ups : HepSignature U} (c : GeneralizedHepDerivor sig tau) (d : GeneralizedHepDerivor tau ups) (C : PartialAlgebra ups.symbol) {a : List S} {s : S} (σ : sig.symbol a s) (b : Word.Family (c.Cell (d.transformed C)) a) {q : d.Cell C (c.sortMap s)} (hq : q ∈ c.imageValue (d.transformed C) σ b) :
                              ↑q ∈ (c.comp d).imageValue C σ fun (j : Fin a.length) => c.comparisonMap d C (a.get j) (b j)

                              Interpreting a symbol successively preserves its value under composite translation.

                              theorem CategorialAlgebras.GeneralizedHepDerivor.comparisonMap_mem_op {S : Type u} {T : Type u'} {U : Type u''} {sig : HepSignature S} {tau : HepSignature T} {ups : HepSignature U} (c : GeneralizedHepDerivor sig tau) (d : GeneralizedHepDerivor tau ups) (C : PartialAlgebra ups.symbol) {a : List S} {s : S} (σ : sig.symbol a s) (b : Word.Family (c.Cell (d.transformed C)) a) {q : (c.transformed (d.transformed C)).carrier s} (hq : q ∈ (c.transformed (d.transformed C)).op σ b) :
                              c.comparisonMap d C s q ∈ ((c.comp d).transformed C).op σ fun (j : Fin a.length) => c.comparisonMap d C (a.get j) (b j)

                              The inclusion of iterated cells preserves the transformed operations.

                              noncomputable def CategorialAlgebras.GeneralizedHepDerivor.comparison {S : Type u} {T : Type u'} {U : Type u''} {sig : HepSignature S} {tau : HepSignature T} {ups : HepSignature U} (c : GeneralizedHepDerivor sig tau) (d : GeneralizedHepDerivor tau ups) (C : PartialAlgebra ups.symbol) :

                              The natural comparison homomorphism $\kappa$ from successive to composite transformation.

                              Formally weaker than the informal statement. Informally, the carrier of the first algebra is a subset of that of the second one and the comparison is the inclusion; here the carrier of a transformed algebra is a subtype of cells, so the comparison is an injective homomorphism that is the identity on elements.

                              Equations
                              Instances For

                                Naturality of the comparison homomorphism in the original partial algebra.

                                Comparison as a natural transformation of partial-algebra functors.

                                Equations
                                Instances For

                                  Invertible comparisons and squares of functors #

                                  theorem CategorialAlgebras.GeneralizedHepDerivor.comparison_injective {S : Type u} {T : Type u'} {U : Type u''} {sig : HepSignature S} {tau : HepSignature T} {ups : HepSignature U} (c : GeneralizedHepDerivor sig tau) (d : GeneralizedHepDerivor tau ups) (C : PartialAlgebra ups.symbol) (s : S) :

                                  The comparison is injective on cells.

                                  theorem CategorialAlgebras.GeneralizedHepDerivor.comparison_isIso {S : Type u} {T : Type u'} {U : Type u''} {sig : HepSignature S} {tau : HepSignature T} {ups : HepSignature U} (c : GeneralizedHepDerivor sig tau) (d : GeneralizedHepDerivor tau ups) (C : PartialAlgebra ups.symbol) (hc : ∀ (s : S), Function.Surjective ((c.comparison d C).toMap s)) (hA : sig.IsEPAlgebra (c.transformed (d.transformed C))) :

                                  A sufficient condition for the comparison to be an identity on elements: its cell inclusion is surjective and the iterated transformation is an ep-algebra.

                                  noncomputable def CategorialAlgebras.GeneralizedHepDerivor.comparisonIso {S : Type u} {T : Type u'} {U : Type u''} {sig : HepSignature S} {tau : HepSignature T} {ups : HepSignature U} (c : GeneralizedHepDerivor sig tau) (d : GeneralizedHepDerivor tau ups) (C : PartialAlgebra ups.symbol) (hc : ∀ (s : S), Function.Surjective ((c.comparison d C).toMap s)) (hA : sig.IsEPAlgebra (c.transformed (d.transformed C))) :

                                  Canonical isomorphism when successive and composite transformations have the same cells and the successive transformation is an ep-algebra.

                                  Formally weaker than the informal statement. Informally, the two algebras are equal; here the carrier of a transformed algebra is a subtype of cells, so the equality becomes an isomorphism that is the identity on elements.

                                  Equations
                                  Instances For
                                    @[simp]
                                    theorem CategorialAlgebras.GeneralizedHepDerivor.comparisonIso_hom {S : Type u} {T : Type u'} {U : Type u''} {sig : HepSignature S} {tau : HepSignature T} {ups : HepSignature U} (c : GeneralizedHepDerivor sig tau) (d : GeneralizedHepDerivor tau ups) (C : PartialAlgebra ups.symbol) (hc : ∀ (s : S), Function.Surjective ((c.comparison d C).toMap s)) (hA : sig.IsEPAlgebra (c.transformed (d.transformed C))) :
                                    (c.comparisonIso d C hc ⋯).hom = c.comparison d C

                                    The canonical comparison isomorphism is the cell inclusion.

                                    @[simp]
                                    theorem CategorialAlgebras.GeneralizedHepDerivor.comparisonIso_inv_val {S : Type u} {T : Type u'} {U : Type u''} {sig : HepSignature S} {tau : HepSignature T} {ups : HepSignature U} (c : GeneralizedHepDerivor sig tau) (d : GeneralizedHepDerivor tau ups) (C : PartialAlgebra ups.symbol) (hc : ∀ (s : S), Function.Surjective ((c.comparison d C).toMap s)) (hA : sig.IsEPAlgebra (c.transformed (d.transformed C))) (s : S) (x : (c.comp d).Cell C s) :
                                    ↑↑((c.comparisonIso d C hc ⋯).inv.toMap s x) = ↑x

                                    The inverse of an invertible comparison also retains the underlying element.

                                    theorem CategorialAlgebras.GeneralizedHepDerivor.comparison_surjective_iff {S : Type u} {T : Type u'} {U : Type u''} {sig : HepSignature S} {tau : HepSignature T} {ups : HepSignature U} (c : GeneralizedHepDerivor sig tau) (d : GeneralizedHepDerivor tau ups) (C : PartialAlgebra ups.symbol) :
                                    (∀ (s : S), Function.Surjective ((c.comparison d C).toMap s)) ↔ ∀ (s : S) (x : d.Cell C (c.sortMap s)), EEquationSet.Satisfies C (Word.singletonValuation ↑x) (d.translateSingletonSet (c.sortMap s) (c.domain s)) → c.IsCell (d.transformed C) s x

                                    Surjectivity of the cell inclusion is exactly reflection of the translated first-domain equations on the cells of the second derivor.

                                    theorem CategorialAlgebras.GeneralizedHepDerivor.comparison_surjective_of_empty {S : Type u} {T : Type u'} {U : Type u''} {sig : HepSignature S} {tau : HepSignature T} {ups : HepSignature U} (c : GeneralizedHepDerivor sig tau) (d : GeneralizedHepDerivor tau ups) (C : PartialAlgebra ups.symbol) (hc : ∀ (s : S), c.domain s = ⊥) (s : S) :

                                    Empty first domains ensure equality of successive and composite cell sets.

                                    noncomputable def CategorialAlgebras.GeneralizedHepDerivor.comparisonNatIso {S : Type u} {T : Type u'} {U : Type u''} {sig : HepSignature S} {tau : HepSignature T} {ups : HepSignature U} (c : GeneralizedHepDerivor sig tau) (d : GeneralizedHepDerivor tau ups) (P : CategoryTheory.ObjectProperty (PartialAlgebra ups.symbol)) (hc : ∀ (C : PartialAlgebra ups.symbol), P C → ∀ (s : S), Function.Surjective ((c.comparison d C).toMap s)) (hA : ∀ (C : PartialAlgebra ups.symbol), P C → sig.IsEPAlgebra (c.transformed (d.transformed C))) :

                                    The comparison is a natural isomorphism on any subcategory satisfying cell equality and the ep-algebra condition for successive transformations.

                                    Equations
                                    Instances For
                                      noncomputable def CategorialAlgebras.GeneralizedHepDerivor.squareNatIso {S : Type u} {T : Type u'} {U : Type u''} {sig : HepSignature S} {tau : HepSignature T} {ups : HepSignature U} {T' : Type u'''} {tau' : HepSignature T'} (c : GeneralizedHepDerivor sig tau) (d : GeneralizedHepDerivor tau ups) (c' : GeneralizedHepDerivor sig tau') (d' : GeneralizedHepDerivor tau' ups) (h : (c.comp d).toDerivor = (c'.comp d').toDerivor) (P : CategoryTheory.ObjectProperty (PartialAlgebra ups.symbol)) (hc : ∀ (C : PartialAlgebra ups.symbol), P C → ∀ (s : S), Function.Surjective ((c.comparison d C).toMap s)) (hc' : ∀ (C : PartialAlgebra ups.symbol), P C → ∀ (s : S), Function.Surjective ((c'.comparison d' C).toMap s)) (hA : ∀ (C : PartialAlgebra ups.symbol), P C → sig.IsEPAlgebra (c.transformed (d.transformed C))) (hA' : ∀ (C : PartialAlgebra ups.symbol), P C → sig.IsEPAlgebra (c'.transformed (d'.transformed C))) (hcell : ∀ (C : PartialAlgebra ups.symbol), P C → ∀ (s : S) (b : C.carrier ((c.comp d).sortMap s)), (c.comp d).IsCell C s b ↔ (c'.comp d').IsCell C s (cast ⋯ b)) :

                                      A square of induced functors commutes up to a natural isomorphism when both successive transformations are ep-algebras with the composite cells, and the composite derivors agree and select the same cells.

                                      Formally weaker than the informal statement. Informally, the two functors are equal; here the carriers of transformed algebras are subtypes of cells, so the equality becomes a natural isomorphism that is the identity on elements.

                                      Equations
                                      Instances For