Equations
- Law.«term_≃_» = Lean.ParserDescr.trailingNode `Law.«term_≃_» 60 61 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ≃ ") (Lean.ParserDescr.cat `term 61))
Instances For
@[reducible, inline]
Equations
Instances For
Equations
- Law.instToJsonMagmaLaw = { toJson := fun (x : Law.MagmaLaw α) => match x with | lhs ≃ rhs => Lean.Json.mkObj [("lhs", Lean.toJson lhs), ("rhs", Lean.toJson rhs)] }
Equations
- Ctx.Membership α = { mem := Membership.mem }
Equations
- instSingletonMagmaLawCtx = { singleton := Set.singleton }
Definition for derivability
- Ax {α : Type u} {Γ : Ctx α} {E : Law.MagmaLaw α} (h : E ∈ Γ) : Γ ⊢ E
- Ref {α : Type u} {Γ : Ctx α} {t : FreeMagma α} : Γ ⊢ t ≃ t
- Sym {α : Type u} {Γ : Ctx α} {t u : FreeMagma α} : Γ ⊢ t ≃ u → Γ ⊢ u ≃ t
- Trans {α : Type u} {Γ : Ctx α} {t u v : FreeMagma α} : Γ ⊢ t ≃ u → Γ ⊢ u ≃ v → Γ ⊢ t ≃ v
- Subst {α : Type u} {Γ : Ctx α} {t u : FreeMagma α} (σ : α → FreeMagma α) : Γ ⊢ t ≃ u → Γ ⊢ t ⬝ σ ≃ u ⬝ σ
- Cong {α : Type u} {Γ : Ctx α} {t₁ t₂ u₁ u₂ : FreeMagma α} : Γ ⊢ t₁ ≃ t₂ → Γ ⊢ u₁ ≃ u₂ → Γ ⊢ t₁ ⋆ u₁ ≃ t₂ ⋆ u₂
Instances For
Definition for derivability where Subst can only be applied to Ax
- SubstAx {α : Type u} {β : Type v} {Γ : Ctx α} {E : Law.MagmaLaw α} (h : E ∈ Γ) (σ : α → FreeMagma β) : Γ ⊢' E.lhs ⬝ σ ≃ E.rhs ⬝ σ
- Ref {α : Type u} {β : Type v} {Γ : Ctx α} {t : FreeMagma β} : Γ ⊢' t ≃ t
- Sym {α : Type u} {β : Type v} {Γ : Ctx α} {t u : FreeMagma β} : Γ ⊢' t ≃ u → Γ ⊢' u ≃ t
- Trans {α : Type u} {β : Type v} {Γ : Ctx α} {t u v : FreeMagma β} : Γ ⊢' t ≃ u → Γ ⊢' u ≃ v → Γ ⊢' t ≃ v
- Cong {α : Type u} {β : Type v} {Γ : Ctx α} {t₁ t₂ u₁ u₂ : FreeMagma β} : Γ ⊢' t₁ ≃ t₂ → Γ ⊢' u₁ ≃ u₂ → Γ ⊢' t₁ ⋆ u₁ ≃ t₂ ⋆ u₂
Instances For
Equations
- derive_of_derive' (derive'.SubstAx h σ) = derive.Subst σ (derive.Ax h)
- derive_of_derive' derive'.Ref = derive.Ref
- derive_of_derive' h.Sym = (derive_of_derive' h).Sym
- derive_of_derive' (htu.Trans huv) = (derive_of_derive' htu).Trans (derive_of_derive' huv)
- derive_of_derive' (h₁.Cong h₂) = (derive_of_derive' h₁).Cong (derive_of_derive' h₂)
Instances For
Equations
- derive'_of_derive H = ⋯.mp (derive'_of_derive.go Lf H)
Instances For
def
derive'_of_derive.go
{α : Type u_1}
{Γ : Ctx α}
{β : Type u_1}
(σ : α → FreeMagma β)
{E : Law.MagmaLaw α}
:
Equations
- derive'_of_derive.go σ (derive.Ax h) = derive'.SubstAx h σ
- derive'_of_derive.go σ derive.Ref = derive'.Ref
- derive'_of_derive.go σ h.Sym = (derive'_of_derive.go σ h).Sym
- derive'_of_derive.go σ (htu.Trans huv) = (derive'_of_derive.go σ htu).Trans (derive'_of_derive.go σ huv)
- derive'_of_derive.go σ (derive.Subst σ_1 h) = ⋯.mpr (derive'_of_derive.go (FreeMagma.evalInMagma σ ∘ σ_1) h)
- derive'_of_derive.go σ (h₁.Cong h₂) = (derive'_of_derive.go σ h₁).Cong (derive'_of_derive.go σ h₂)
Instances For
Definitions of entailment
Instances For
Notation for derivability and entailment
satisfies G E, or G ⊧ E, means that all evaluations of E in G are true.
Equations
- «term_⊧_» = Lean.ParserDescr.trailingNode `«term_⊧_» 50 51 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⊧ ") (Lean.ParserDescr.cat `term 51))
Instances For
satisfiesSet G Γ, or G ⊧ Γ, means that G satisfies every element of Γ.
Equations
- «term_⊧__1» = Lean.ParserDescr.trailingNode `«term_⊧__1» 50 51 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⊧ ") (Lean.ParserDescr.cat `term 51))
Instances For
models Γ E, or Γ ⊧ E, means that every magma G satisfying Γ also satisfies E.
Equations
- «term_⊧__2» = Lean.ParserDescr.trailingNode `«term_⊧__2» 50 51 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⊧ ") (Lean.ParserDescr.cat `term 51))
Instances For
Definition for derivability
Equations
- «term_⊢_» = Lean.ParserDescr.trailingNode `«term_⊢_» 50 51 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⊢ ") (Lean.ParserDescr.cat `term 51))
Instances For
Definition for derivability where Subst can only be applied to Ax
Equations
- «term_⊢'_» = Lean.ParserDescr.trailingNode `«term_⊢'_» 50 51 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⊢' ") (Lean.ParserDescr.cat `term 51))
Instances For
Equations
- Law.MagmaLaw.map f (lhs ≃ rhs) = (FreeMagma.fmapHom f) lhs ≃ (FreeMagma.fmapHom f) rhs
Instances For
Equations
- Law.MagmaLaw.Mem a m = (FreeMagma.Mem a m.lhs ∨ FreeMagma.Mem a m.rhs)
Instances For
instance
Law.MagmaLaw.instDecidableMemOfDecidableEq
{α : Type u_1}
[DecidableEq α]
(a : α)
(m : MagmaLaw α)
:
Equations
- Law.MagmaLaw.instDecidableMemOfDecidableEq a m = decidable_of_iff (a ∈ ↑m.elems) ⋯
Equations
- (lhs ≃ rhs).pmap f = (lhs.pmap fun (a : α) (h : FreeMagma.Mem a lhs) => f a ⋯) ≃ rhs.pmap fun (a : α) (h : FreeMagma.Mem a rhs) => f a ⋯
Instances For
Instances For
Instances For
theorem
Law.satisfiesPhi_symm_law
{α : Type u_1}
{G : Type u_2}
[Magma G]
(φ : α → G)
(E : MagmaLaw α)
(h : satisfiesPhi φ E)
:
satisfiesPhi φ E.symm
theorem
Law.satisfiesPhi_pmap
{α : Type u_1}
{β : Type u_2}
{G : Type u_3}
[Magma G]
{φ : β → G}
{ψ : α → G}
(E : MagmaLaw α)
(f : (a : α) → MagmaLaw.Mem a E → β)
(H : ∀ (a : α) (h : MagmaLaw.Mem a E), φ (f a h) = ψ a)
:
theorem
Law.satisfiesPhi_pmap_mk
{α : Type u_1}
{G : Type u_2}
[Magma G]
{φ : α → G}
{E : MagmaLaw α}
(P : α → Prop)
(hp : ∀ (a : α), MagmaLaw.Mem a E → P a)
:
satisfiesPhi (fun (x : Subtype P) => φ ↑x) (E.pmap fun (a : α) (h : MagmaLaw.Mem a E) => ⟨a, ⋯⟩) ↔ satisfiesPhi φ E
theorem
Law.satisfiesPhi_attach
{α : Type u_1}
{G : Type u_2}
[Magma G]
{φ : α → G}
{E : MagmaLaw α}
:
theorem
Law.satisfiesPhi_symm
{α : Type u_1}
{G : Type u_2}
[Magma G]
(φ : α → G)
(w₁ w₂ : FreeMagma α)
(h : satisfiesPhi φ (w₁ ≃ w₂))
:
satisfiesPhi φ (w₂ ≃ w₁)
theorem
Law.satisfies_map_injective
{α : Type u_1}
{β : Type u_2}
{G : Type u_3}
[Magma G]
(f : α → β)
(hf : Function.Injective f)
{E : MagmaLaw α}
:
theorem
Law.satisfies_pmap_mk
{α : Type u_1}
{G : Type u_2}
[DecidableEq α]
[Magma G]
{E : MagmaLaw α}
(P : α → Prop)
(hp : ∀ (a : α), MagmaLaw.Mem a E → P a)
:
@[irreducible]
def
Law.derive'_map
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : β → γ}
{Γ : Ctx α}
{E : MagmaLaw β}
:
Γ ⊢' E → Γ ⊢' MagmaLaw.map f E
Equations
- Law.derive'_map (derive'.SubstAx h σ) = ⋯.mpr (derive'.SubstAx h (⇑(FreeMagma.fmapHom f) ∘ σ))
- Law.derive'_map derive'.Ref = derive'.Ref
- Law.derive'_map h.Sym = (Law.derive'_map h).Sym
- Law.derive'_map (h1.Trans h2) = (Law.derive'_map h1).Trans (Law.derive'_map h2)
- Law.derive'_map (h1.Cong h2) = (Law.derive'_map h1).Cong (Law.derive'_map h2)
Instances For
theorem
Law.derive'_map_injective
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{f : β → γ}
(hf : Function.Injective f)
{Γ : Ctx α}
{E : MagmaLaw β}
:
def
Law.derive'_pmap
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
[DecidableEq β]
{Γ : Ctx α}
{E : MagmaLaw β}
(f : (a : β) → MagmaLaw.Mem a E → γ)
: