Quotient open theories #
OpenTheory.quotient T E is the open theory whose objects at each boundary are
the classes of T's objects under the congruence E, with the operations
descended along Quotient.map' and Quotient.map₂'.
The point of the construction is to prove coherence once. A theory whose laws
hold only up to E satisfies the laws modulo E — the classes
IsLawfulMod, IsMonoidalMod, IsTracedMod, IsCompactClosedMod,
HasPlugWireFactorMod, and HasPlugFactorizationMod, whose fields are the
strict laws with equality replaced by E.rel — and each of them lifts to the
corresponding strict class on the quotient. A strict theory satisfies every
law modulo any congruence, so nothing is lost for theories that already
satisfy the strict ladder.
Downstream, the composition theorems of Emulates therefore apply to the
quotient of a process model unchanged, and observations on the quotient pull
back to observations on the model that respect factorization; see
EmulatesQuotient.
The quotient theory #
The quotient of T by the congruence E.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The class of an object in the quotient theory.
Equations
- E.cls W = Quotient.mk'' W
Instances For
Induction on the quotient: it suffices to consider classes.
Laws modulo a congruence #
Naturality of the operations up to E: the fields of IsLawful with
equality replaced by E.rel.
Instances
The symmetric monoidal laws up to E.
- par_comm {Δ₁ Δ₂ : PortBoundary} (W₁ : T.Obj Δ₁) (W₂ : T.Obj Δ₂) : E.rel (T.map (PortBoundary.Equiv.tensorComm Δ₁ Δ₂).toHom (T.par W₁ W₂)) (T.par W₂ W₁)
- par_leftUnit {Δ : PortBoundary} (W : T.Obj Δ) : E.rel (T.map (PortBoundary.Equiv.tensorEmptyLeft Δ).toHom (T.par HasUnit.unit W)) W
- par_rightUnit {Δ : PortBoundary} (W : T.Obj Δ) : E.rel (T.map (PortBoundary.Equiv.tensorEmptyRight Δ).toHom (T.par W HasUnit.unit)) W
Instances
The trace laws up to E.
- par_comm {Δ₁ Δ₂ : PortBoundary} (W₁ : T.Obj Δ₁) (W₂ : T.Obj Δ₂) : E.rel (T.map (PortBoundary.Equiv.tensorComm Δ₁ Δ₂).toHom (T.par W₁ W₂)) (T.par W₂ W₁)
- par_leftUnit {Δ : PortBoundary} (W : T.Obj Δ) : E.rel (T.map (PortBoundary.Equiv.tensorEmptyLeft Δ).toHom (T.par HasUnit.unit W)) W
- par_rightUnit {Δ : PortBoundary} (W : T.Obj Δ) : E.rel (T.map (PortBoundary.Equiv.tensorEmptyRight Δ).toHom (T.par W HasUnit.unit)) W
- wire_par_superpose {Δ₁ Δ₂ Γ Δ₃ : PortBoundary} (W₁ : T.Obj Δ₁) (W₂ : T.Obj (Δ₂.tensor Γ)) (W₃ : T.Obj (Γ.swap.tensor Δ₃)) : E.rel (T.wire (T.map (PortBoundary.Equiv.tensorAssoc Δ₁ Δ₂ Γ).symm.toHom (T.par W₁ W₂)) W₃) (T.map (PortBoundary.Equiv.tensorAssoc Δ₁ Δ₂ Δ₃).symm.toHom (T.par W₁ (T.wire W₂ W₃)))
- wire_comm {Δ₁ Γ Δ₂ : PortBoundary} (W₁ : T.Obj (Δ₁.tensor Γ)) (W₂ : T.Obj (Γ.swap.tensor Δ₂)) : E.rel (T.wire W₁ W₂) (T.map (PortBoundary.Equiv.tensorComm Δ₂ Δ₁).toHom (T.wire (T.map (PortBoundary.Equiv.tensorComm Γ.swap Δ₂).toHom W₂) (T.map (PortBoundary.Equiv.tensorComm Δ₁ Γ).toHom W₁)))
Instances
The compact-closure laws up to E.
- par_comm {Δ₁ Δ₂ : PortBoundary} (W₁ : T.Obj Δ₁) (W₂ : T.Obj Δ₂) : E.rel (T.map (PortBoundary.Equiv.tensorComm Δ₁ Δ₂).toHom (T.par W₁ W₂)) (T.par W₂ W₁)
- par_leftUnit {Δ : PortBoundary} (W : T.Obj Δ) : E.rel (T.map (PortBoundary.Equiv.tensorEmptyLeft Δ).toHom (T.par HasUnit.unit W)) W
- par_rightUnit {Δ : PortBoundary} (W : T.Obj Δ) : E.rel (T.map (PortBoundary.Equiv.tensorEmptyRight Δ).toHom (T.par W HasUnit.unit)) W
- wire_par_superpose {Δ₁ Δ₂ Γ Δ₃ : PortBoundary} (W₁ : T.Obj Δ₁) (W₂ : T.Obj (Δ₂.tensor Γ)) (W₃ : T.Obj (Γ.swap.tensor Δ₃)) : E.rel (T.wire (T.map (PortBoundary.Equiv.tensorAssoc Δ₁ Δ₂ Γ).symm.toHom (T.par W₁ W₂)) W₃) (T.map (PortBoundary.Equiv.tensorAssoc Δ₁ Δ₂ Δ₃).symm.toHom (T.par W₁ (T.wire W₂ W₃)))
- wire_comm {Δ₁ Γ Δ₂ : PortBoundary} (W₁ : T.Obj (Δ₁.tensor Γ)) (W₂ : T.Obj (Γ.swap.tensor Δ₂)) : E.rel (T.wire W₁ W₂) (T.map (PortBoundary.Equiv.tensorComm Δ₂ Δ₁).toHom (T.wire (T.map (PortBoundary.Equiv.tensorComm Γ.swap Δ₂).toHom W₂) (T.map (PortBoundary.Equiv.tensorComm Δ₁ Γ).toHom W₁)))
- wire_idWire (Γ : PortBoundary) {Δ₂ : PortBoundary} (W₂ : T.Obj (Γ.swap.tensor Δ₂)) : E.rel (T.wire (HasIdWire.idWire Γ) W₂) W₂
- wire_idWire_right (Γ : PortBoundary) {Δ₁ : PortBoundary} (W₁ : T.Obj (Δ₁.tensor Γ)) : E.rel (T.wire W₁ (HasIdWire.idWire Γ)) W₁
Instances
The plug-wire factorization laws up to E.
- par_comm {Δ₁ Δ₂ : PortBoundary} (W₁ : T.Obj Δ₁) (W₂ : T.Obj Δ₂) : E.rel (T.map (PortBoundary.Equiv.tensorComm Δ₁ Δ₂).toHom (T.par W₁ W₂)) (T.par W₂ W₁)
- par_leftUnit {Δ : PortBoundary} (W : T.Obj Δ) : E.rel (T.map (PortBoundary.Equiv.tensorEmptyLeft Δ).toHom (T.par HasUnit.unit W)) W
- par_rightUnit {Δ : PortBoundary} (W : T.Obj Δ) : E.rel (T.map (PortBoundary.Equiv.tensorEmptyRight Δ).toHom (T.par W HasUnit.unit)) W
- wire_par_superpose {Δ₁ Δ₂ Γ Δ₃ : PortBoundary} (W₁ : T.Obj Δ₁) (W₂ : T.Obj (Δ₂.tensor Γ)) (W₃ : T.Obj (Γ.swap.tensor Δ₃)) : E.rel (T.wire (T.map (PortBoundary.Equiv.tensorAssoc Δ₁ Δ₂ Γ).symm.toHom (T.par W₁ W₂)) W₃) (T.map (PortBoundary.Equiv.tensorAssoc Δ₁ Δ₂ Δ₃).symm.toHom (T.par W₁ (T.wire W₂ W₃)))
- wire_comm {Δ₁ Γ Δ₂ : PortBoundary} (W₁ : T.Obj (Δ₁.tensor Γ)) (W₂ : T.Obj (Γ.swap.tensor Δ₂)) : E.rel (T.wire W₁ W₂) (T.map (PortBoundary.Equiv.tensorComm Δ₂ Δ₁).toHom (T.wire (T.map (PortBoundary.Equiv.tensorComm Γ.swap Δ₂).toHom W₂) (T.map (PortBoundary.Equiv.tensorComm Δ₁ Γ).toHom W₁)))
- wire_idWire (Γ : PortBoundary) {Δ₂ : PortBoundary} (W₂ : T.Obj (Γ.swap.tensor Δ₂)) : E.rel (T.wire (HasIdWire.idWire Γ) W₂) W₂
- wire_idWire_right (Γ : PortBoundary) {Δ₁ : PortBoundary} (W₁ : T.Obj (Δ₁.tensor Γ)) : E.rel (T.wire W₁ (HasIdWire.idWire Γ)) W₁
- plug_eq_wire {Δ : PortBoundary} (W : T.Obj Δ) (K : T.Obj Δ.swap) : E.rel (T.plug W K) (T.map (PortBoundary.Equiv.tensorEmptyLeft PortBoundary.empty).toHom (T.wire (T.map (PortBoundary.Equiv.tensorEmptyLeft Δ).symm.toHom W) (T.map (PortBoundary.Equiv.tensorEmptyRight Δ.swap).symm.toHom K)))
Instances
The five plug-factorization laws up to E.
- close_par_left {Δ₁ Δ₂ : PortBoundary} (W₁ : T.Obj Δ₁) (W₂ : T.Obj Δ₂) (K : T.Plug (Δ₁.tensor Δ₂)) : E.rel (T.close (T.par W₁ W₂) K) (T.close W₁ (parContextLeft W₂ K))
- close_par_right {Δ₁ Δ₂ : PortBoundary} (W₁ : T.Obj Δ₁) (W₂ : T.Obj Δ₂) (K : T.Plug (Δ₁.tensor Δ₂)) : E.rel (T.close (T.par W₁ W₂) K) (T.close W₂ (parContextRight W₁ K))
Instances
Strict laws hold modulo any congruence #
Laws modulo the congruence lift to the quotient #
Equations
Equations
- Interaction.Open.OpenTheory.instHasIdWireQuotient E = { idWire := fun (Γ : Interaction.PortBoundary) => E.cls (Interaction.Open.OpenTheory.HasIdWire.idWire Γ) }
Equations
- Interaction.Open.OpenTheory.instIsMonoidalQuotientOfIsMonoidalMod E = { toIsLawful := ⋯, toHasUnit := inferInstance, par_assoc := ⋯, par_comm := ⋯, par_leftUnit := ⋯, par_rightUnit := ⋯ }
Equations
- Interaction.Open.OpenTheory.instIsTracedQuotientOfIsTracedMod E = { toIsMonoidal := inferInstance, wire_assoc := ⋯, wire_par_superpose := ⋯, wire_comm := ⋯ }
Equations
- Interaction.Open.OpenTheory.instIsCompactClosedQuotientOfIsCompactClosedMod E = { toIsTraced := inferInstance, toHasIdWire := inferInstance, wire_idWire := ⋯, wire_idWire_right := ⋯, unit_eq := ⋯ }
Equations
- Interaction.Open.OpenTheory.instHasPlugWireFactorQuotientOfHasPlugWireFactorMod E = { toIsCompactClosed := inferInstance, plug_eq_wire := ⋯, plug_par_left := ⋯, plug_wire_left := ⋯ }