Idris2Doc : Frex.Model

Frex.Model

Models for a `Frex.Presentation` and associated definitions

Definitions

0models : (a : SetoidAlgebrasig) -> (eq : Equationsig) -> (Fin (eq.support) ->U (a.algebra)) ->Type
  States: The `sig`-algebra `a` satisfies the equation `eq`: for all
environments, the interpretations of the lhs and rhs are in the
setoid equivalence.

Totality: total
Visibility: public export
0(=|) : (eq : Equationsig) -> (a : SetoidAlgebrasig**Fin (eq.support) ->U (a.algebra)) ->Type
  Like `models`, but the arguments are reversed and packed slightly
more compactly, makes nice syntax sometimes

Totality: total
Visibility: public export
Fixity Declaration: infix operator, level 1
eqPreservation : (eq : (Termsigx, Termsigx)) -> (env : (x->Ua)) -> (h : a~>b) -> (a.equivalence) .relation (a.Sem (fsteq) env) (a.Sem (sndeq) env) -> (b.equivalence) .relation (b.Sem (fsteq) ((h.H) .H.env)) (b.Sem (sndeq) ((h.H) .H.env))
  Homomorphisms preserve equations in an environment

Totality: total
Visibility: public export
0ValidatesEquation : Equationsig->SetoidAlgebrasig->Type
  States: `pres.signature`-algebra `a` satisfies the given equation.

Totality: total
Visibility: public export
0Validates : (pres : Presentation) ->SetoidAlgebra (pres.signature) ->Type
  States: `pres.signature`-algebra `a` satisfies all the axioms of `pres`.

Totality: total
Visibility: public export
semPreservation : (iso : a<~>b) -> (t : Termsigx) -> (env : (x->Ub)) -> (b.equivalence) .relation (bindTermtenv) (((iso.Iso) .Fwd) .H (a.Semt (((iso.Iso) .Bwd) .H.env)))
  Isomorphisms let us replace the semantics of one algebra with another

Totality: total
Visibility: public export
isoPreservesEq : (iso : a<~>b) -> (eq : Equationsig) -> (env : (Fin (eq.support) ->Ub)) ->eq=| (a** ((iso.Iso) .Bwd) .H.env) ->eq=| (b**env)
  Isomorphisms preserve all equations

Totality: total
Visibility: public export
isoPreservesModels : (pres : Presentation) ->a<~>b->Validatespresa->Validatespresb
  Algebra isomorphisms preserve transport models

Totality: total
Visibility: public export
recordModel : Presentation->Type
  A model for an algebraic theory

Totality: total
Visibility: public export
Constructor: 
MkModel : {0Pres : Presentation} -> (Algebra : SetoidAlgebra (Pres.signature)) ->ValidatesPresAlgebra->ModelPres

Projections:
.Algebra : {0Pres : Presentation} ->ModelPres->SetoidAlgebra (Pres.signature)
  Algebra structure for the operations
.Validate : {0Pres : Presentation} -> ({rec:0} : ModelPres) ->ValidatesPres (Algebra{rec:0})
  The algebra validates all the equations

Hints:
Cast (Modelpres) Setoid
pres.signature=sig=>Semantic (a<~.~>b) (Opsig)
pres.signature=sig=>Semantic (a<~.~>b) (Termsigy)
pres.signature=sig=>Semantic (Coproductab) (Opsig)
pres.signature=sig=>Semantic (Coproductab) (Termsigy)
pres.signature=sig=>Semantic (Extensionax) (Opsig)
pres.signature=sig=>Semantic (Extensionax) (Termsigy)
pres.signature=sig=>Semantic (Frexax) (Opsig)
pres.signature=sig=>Semantic (Frexax) (Termsigy)
pres.signature=sig=>Semantic (Modelpres) (Opsig)
pres.signature=sig=>Semantic (Modelpres) (Termsigx)
.Algebra : {0Pres : Presentation} ->ModelPres->SetoidAlgebra (Pres.signature)
  Algebra structure for the operations

Totality: total
Visibility: public export
Algebra : {0Pres : Presentation} ->ModelPres->SetoidAlgebra (Pres.signature)
  Algebra structure for the operations

Totality: total
Visibility: public export
.Validate : {0Pres : Presentation} -> ({rec:0} : ModelPres) ->ValidatesPres (Algebra{rec:0})
  The algebra validates all the equations

Totality: total
Visibility: public export
Validate : {0Pres : Presentation} -> ({rec:0} : ModelPres) ->ValidatesPres (Algebra{rec:0})
  The algebra validates all the equations

Totality: total
Visibility: public export
cast : (a : Modelpres) ->Preorder (((a.Algebra) .algebra) .U) (((a.Algebra) .equivalence) .relation)
Totality: total
Visibility: public export
0U : Modelpres->Type
  Type carrying the model

Totality: total
Visibility: public export
.equivalence : (a : Modelpres) ->Equivalence (Ua)
Totality: total
Visibility: public export
0.rel : (a : Modelpres) ->Ua->Ua->Type
  Equivalence relation underlying a model

Totality: total
Visibility: public export
(~>) : Modelpres->Modelpres->Type
  Homomorphism between models

Totality: total
Visibility: public export
Fixity Declarations:
infix operator, level 5
infix operator, level 5
infix operator, level 5
id : (a : Modelpres) ->a~>a
  Identity homomorphism between models

Totality: total
Visibility: public export
.sem : (a : Modelpres) -> (pres.signature) .OpWithArityn->aryn (Ua)
  nary interpretation of an operator in a model

Totality: total
Visibility: public export
(~~>) : Modelpres->Modelpres->Setoid
  The setoid of homomorphisms between models with pointwise equivalence.

Totality: total
Visibility: public export
Fixity Declaration: infix operator, level 5
post : b~>c-> (a~~>b) ~> (a~~>c)
Totality: total
Visibility: public export
pre : a2~>a1-> (a1~~>b) ~> (a2~~>b)
Totality: total
Visibility: public export
transport : (a : Modelpres) ->a.Algebra<~>b->Modelpres
Totality: total
Visibility: public export
.cong : (a : Modelpres) -> (0n : Nat) -> (t : Term (pres.signature) (Either (Ua) (Finn))) -> (lhs : Vectn (Ua)) -> (rhs : Vectn (Ua)) ->HVect (tabulate (\i=> ((casta) .equivalence) .relation (indexilhs) (indexirhs))) -> ((casta) .equivalence) .relation (a.Semt (either (Delay id) (Delay (flipindexlhs)))) (a.Semt (either (Delay id) (Delay (flipindexrhs))))
  N-ary congruence in a term with `n` varialbes

Totality: total
Visibility: public export
Dyn : Finn->Termsig (Eithera (Finn))
Totality: total
Visibility: public export
Sta : a->Termsig (Eithera (Finn))
Totality: total
Visibility: public export
.validate : (a : Modelpres) -> (ax : Axiompres) -> (env : Vect (support (pres.axiomax)) (Ua)) ->pres.axiomax=| (a.Algebra** \i=>indexienv)
Totality: total
Visibility: public export