Formalization of the Univalence Axiom #
Formalizes the HoTT univalence axiom (A ≃ B) ≃ (A = B) in the MBSE design space.
Since Lean 4 is not a cubical type theory, full univalence does not hold intrinsically.
Instead, we use a setoid quotient to construct the design space DesignSpace
as PartDef / ComponentEquiv. On this quotient type, the following hold:
- Sound (ua):
ComponentEquiv a b → ⟦a⟧ = ⟦b⟧ - Complete (ua⁻¹):
⟦a⟧ = ⟦b⟧ → ComponentEquiv a b - Transport:
⟦a⟧ = ⟦b⟧ → P ⟦a⟧ → P ⟦b⟧ - Path induction: Induction on the quotient type
- Fiber: Lifting of design space points
References #
- HoTT Book §2.10 (Universes and the univalence axiom)
- Setoid model of HoTT (Altenkirch, Boulier, Kaposi, Tabareau 2019)
Proof that ComponentEquiv is an equivalence relation.
Setoid instance on PartDef. Uses ComponentEquiv as the equivalence relation.
DesignSpace: quotient type of PartDef by ComponentEquiv.
Corresponds to the HoTT universe U. Equal elements are mutually substitutable.
Instances For
Embedding from PartDef into DesignSpace.
Equations
Instances For
Notation: ⟦pd⟧ denotes DesignSpace.mk pd.
Equations
- One or more equations did not get rendered due to their size.
Instances For
ua (Univalence axiom, sound direction): ComponentEquiv a b → ⟦a⟧ = ⟦b⟧. Automatically holds via Quotient.sound in the setoid quotient.
ua_inv (Univalence axiom, complete direction): ⟦a⟧ = ⟦b⟧ → ComponentEquiv a b. Holds via Quotient.exact.
ua and ua_inv are mutual inverses. This gives the equivalence (ComponentEquiv a b) ≃ (⟦a⟧ = ⟦b⟧).
transport: transports a predicate on DesignSpace along an equality. MBSE version of HoTT transport: (p : a = b) → P a → P b.
transport_symm: transport in the reverse direction.
transport_refl: transport along reflexive equivalence is the identity.
Lift for defining predicates on DesignSpace. Only predicates respecting ComponentEquiv can be lifted.
Equations
Instances For
liftProp is consistent with the original predicate.
Lift for Bool-valued functions on DesignSpace.
Equations
- VerifiedMBSE.Equivalence.DesignSpace.liftBool f resp = Quotient.lift f resp
Instances For
Induction on DesignSpace (universal quantification). MBSE version of HoTT path induction.
Binary induction on DesignSpace.
Fiber: fiber over a point d in the design space. The set of all concrete PartDefs equivalent to d. HoTT homotopy fiber fib(f, b) = Σ(a:A). f(a) = b.
Equations
Instances For
Every fiber is nonempty (every DesignSpace point has a representative).
Any two elements of a fiber are ComponentEquiv.
ComponentEquiv has a groupoid structure (strict category with invertible morphisms). refl = id, trans = comp, symm = inv.
Replacing a component in a system with an equivalent one does not change its representation in the design space.
Invariants are well-defined on the design space (respect ComponentEquiv).
Lifting the invariant to DesignSpace.
Equations
Instances For
designInvariant is consistent with the original invariant.