Properties
Ian Ray. 7th November 2025. Internal code review and addition by Carlo Angiuli 18th November 2025. Minor changes and merged into TypeToplogy in June 2026.{-# OPTIONS --safe --without-K #-} open import UF.FunExt module ReflexiveGraphs.Properties (fe : Fun-Ext) where open import MLTT.Spartan open import UF.Equiv open import UF.EquivalenceExamples open import UF.Subsingletons open import UF.Subsingletons-FunExt open import UF.PropIndexedPiSigma open import ReflexiveGraphs.Constructions open import ReflexiveGraphs.UnivalentClosureProperties open import ReflexiveGraphs.Displayed open import ReflexiveGraphs.DisplayedUnivalent open import ReflexiveGraphs.Lenses open import ReflexiveGraphs.Type open import ReflexiveGraphs.UnbiasedLenses open import ReflexiveGraphs.Univalent private fe' : FunExt fe' π€ π₯ = fe {π€} {π₯}In this file we observe that univalence of (displayed) reflexive graphs and the structure of a lens on a reflexive graph and associated family of reflexive graphs are properties rather than data. For this, we globally assume function extensionality, and for the latter, we assume univalence of the reflexive graphs in question. We show that univalence for (displayed) reflexive graphs is a proposition.refl-graph-univalence-is-a-property : (π : Refl-Graph π€ π₯) β is-prop (is-univalent-refl-graph π) refl-graph-univalence-is-a-property π = Ξ -is-prop fe (Ξ» - β being-prop-is-prop fe) displayed-refl-graph-univalence-is-a-property : (π : Refl-Graph π€ π₯) (π : Displayed-Refl-Graph π€' π₯' π) β is-prop (is-displayed-univalent-refl-graph π π) displayed-refl-graph-univalence-is-a-property π π = Ξ -is-prop fe (Ξ» - β refl-graph-univalence-is-a-property ([ π ] -))We show that the oplax contravariant lens structure is contractible and in fact a property of the reflexive graph and family of reflexive graphs.module _ (π€' π₯' : Universe) (π : Refl-Graph π€ π₯) (π : β¨ π β© β Refl-Graph π€' π₯') where oplax-lens-structure-is-contr : is-univalent-refl-graph π β ((x : β¨ π β©) β is-univalent-refl-graph (π x)) β is-contr (oplax-covariant-lens-structure π€' π₯' π π) oplax-lens-structure-is-contr is-ua-π is-ua-π = equiv-to-singleton I (Ξ -is-singleton fe (Ξ» x β equiv-to-singleton (II x) (III x))) where open oplax-covariant-lens-structure I : oplax-covariant-lens-structure π€' π₯' π π β ((x : β¨ π β©) β Ξ£ Ο κ ((y : β¨ π β©) (p : x ββ¨ π β© y) β β¨ π x β© β β¨ π y β©) , ((u : β¨ π x β©) β Ο x (β-refl π x) u ββ¨ π x β© u)) I = qinveq (Ξ» π x β ((Ξ» _ β push π) , push-refl π)) ((Ξ» f β record {push = Ξ» {x y} β (prβ (f x)) y ; push-refl = Ξ» {x} β prβ (f x)}) , βΌ-refl , βΌ-refl) II : (x : β¨ π β©) β _ β (cofan (β¨ π x β© β π x) id) II x = (Ξ£ Ο κ ((y : β¨ π β©) (p : x ββ¨ π β© y) β β¨ π x β© β β¨ π y β©) , ((u : β¨ π x β©) β Ο x (β-refl π x) u ββ¨ π x β© u)) ββ¨ Ξ£-change-of-variable-β _ (β-sym (curry-uncurry fe')) β© (Ξ£ Ο κ (((y , p) : fan π x) β β¨ π x β© β β¨ π y β©) , ((u : β¨ π x β©) β Ο (x , (β-refl π x)) u ββ¨ π x β© u)) ββ¨ Ξ£-change-of-variable-β _ (prop-indexed-product (x , β-refl π x) fe (is-ua-π x)) β© (Ξ£ Ο κ (β¨ π x β© β β¨ π x β©) , ((u : β¨ π x β©) β Ο u ββ¨ π x β© u)) ββ¨by-definitionβ© cofan (β¨ π x β© β π x) id β III : (x : β¨ π β©) β is-contr (cofan (β¨ π x β© β π x) id) III x = prop-fan-to-contr-cofan (β¨ π x β© β π x) (univalence-closed-under-cotensor fe _ (π x) (is-ua-π x)) id oplax-lens-structure-is-a-property : is-univalent-refl-graph π β ((x : β¨ π β©) β is-univalent-refl-graph (π x)) β is-prop (oplax-covariant-lens-structure π€' π₯' π π) oplax-lens-structure-is-a-property is-ua-π is-ua-π = singletons-are-props (oplax-lens-structure-is-contr is-ua-π is-ua-π)Similarly, a lax covariant lens structure is contractible and thus a property.lax-lens-structure-is-contr : is-univalent-refl-graph π β ((x : β¨ π β©) β is-univalent-refl-graph (π x)) β is-contr (lax-contravariant-lens-structure π€' π₯' π π) lax-lens-structure-is-contr is-ua-π is-ua-π = equiv-to-singleton I (Ξ -is-singleton fe (Ξ» x β equiv-to-singleton (III x) (II x))) where open lax-contravariant-lens-structure I : lax-contravariant-lens-structure π€' π₯' π π β ((x : β¨ π β©) β Ξ£ Ο κ ((y : β¨ π β©) (p : x ββ¨ π β© y) β β¨ π y β© β β¨ π x β©) , ((u : β¨ π x β©) β u ββ¨ π x β© Ο x (β-refl π x) u)) I = qinveq (Ξ» π x β ((Ξ» _ β pull π) , pull-refl π)) ((Ξ» f β record {pull = Ξ» {x y} β (prβ (f x)) y ; pull-refl = Ξ» {x} β prβ (f x)}) , βΌ-refl , βΌ-refl) II : (x : β¨ π β©) β is-contr (fan (β¨ π x β© β π x) id) II x = prop-fan-to-contr (β¨ π x β© β π x) (univalence-closed-under-cotensor fe _ (π x) (is-ua-π x)) id III : (x : β¨ π β©) β _ β fan (β¨ π x β© β π x) id III x = (Ξ£ Ο κ ((y : β¨ π β©) (p : x ββ¨ π β© y) β β¨ π y β© β β¨ π x β©) , ((u : β¨ π x β©) β u ββ¨ π x β© Ο x (β-refl π x) u)) ββ¨ Ξ£-change-of-variable-β _ (β-sym (curry-uncurry fe')) β© (Ξ£ Ο κ (((y , p) : fan π x) β β¨ π y β© β β¨ π x β©) , ((u : β¨ π x β©) β u ββ¨ π x β© Ο (x , (β-refl π x)) u)) ββ¨ Ξ£-change-of-variable-β _ (prop-indexed-product (x , β-refl π x) fe (is-ua-π x)) β© (Ξ£ Ο κ (β¨ π x β© β β¨ π x β©) , ((u : β¨ π x β©) β u ββ¨ π x β© Ο u)) ββ¨by-definitionβ© fan (β¨ π x β© β π x) id β lax-lens-structure-is-a-property : is-univalent-refl-graph π β ((x : β¨ π β©) β is-univalent-refl-graph (π x)) β is-prop (lax-contravariant-lens-structure π€' π₯' π π) lax-lens-structure-is-a-property is-ua-π is-ua-π = singletons-are-props (lax-lens-structure-is-contr is-ua-π is-ua-π)Finally, an unbiased lens structure is contractible and thus a property.module _ (π€' π₯' : Universe) (π : Refl-Graph π€ π₯) (π : {x y : β¨ π β©} β (x ββ¨ π β© y) β Refl-Graph π€' π₯') where unbiased-lens-structure-is-contr : is-univalent-refl-graph π β ((x y : β¨ π β©) (p : x ββ¨ π β© y) β is-univalent-refl-graph (π p)) β is-contr (unbiased-lens-structure π€' π₯' π π) unbiased-lens-structure-is-contr is-ua-π is-ua-π = equiv-to-singleton I (Ξ -is-singleton fe (Ξ» x β equiv-to-singleton (III x) (II x id))) where open unbiased-lens-structure I : unbiased-lens-structure π€' π₯' π π β ((x : β¨ π β©) β Ξ£ Ο κ ((y : β¨ π β©) (p : x ββ¨ π β© y) β β¨ π (β-refl π x) β© β β¨ π p β©) , Ξ£ Ο κ ((y : β¨ π β©) (p : x ββ¨ π β© y) β β¨ π (β-refl π y) β© β β¨ π p β©) , ((u : β¨ π (β-refl π x) β©) β Ο x (β-refl π x) u ββ¨ π (β-refl π x) β© Ο x (β-refl π x) u) Γ ((u : β¨ π (β-refl π x) β©) β u ββ¨ π (β-refl π x) β© Ο x (β-refl π x) u)) I = qinveq (Ξ» π x β ((Ξ» _ β lext π) , (Ξ» _ β rext π) , ext-refl π , rext-refl π)) ((Ξ» f β record {lext = Ξ» {x y} β (prβ (f x)) y ; rext = Ξ» {x y} β (prβ (prβ (f x))) y ; ext-refl = Ξ» {x} β prβ (prβ (prβ (f x))) ; rext-refl = Ξ» {x} β prβ (prβ (prβ (f x)))}) , βΌ-refl , βΌ-refl) II : (x : β¨ π β©) (Ο : β¨ β¨ π (β-refl π x) β© β π (β-refl π x) β©) β is-contr (fan (β¨ π (β-refl π x) β© β π (β-refl π x)) Ο) II x Ο = prop-fan-to-contr (β¨ π (β-refl π x) β© β π (β-refl π x)) (univalence-closed-under-cotensor fe _ (π (β-refl π x)) (is-ua-π x x (β-refl π x))) Ο III : (x : β¨ π β©) β _ β fan (β¨ π (β-refl π x) β© β π (β-refl π x)) id III x = (Ξ£ Ο κ ((y : β¨ π β©) (p : x ββ¨ π β© y) β β¨ πΉ β© β β¨ π p β©) , Ξ£ Ο κ ((y : β¨ π β©) (p : x ββ¨ π β© y) β β¨ π (β-refl π y) β© β β¨ π p β©) , ((u : B) β Ο x r u ββ¨ πΉ β© Ο x r u) Γ ((u : B) β u ββ¨ πΉ β© Ο x r u)) ββ¨ IV β© (Ξ£ Ο κ (((y , p) : fan π x) β β¨ πΉ β© β β¨ π p β©) , Ξ£ Ο κ (((y , p) : fan π x) β β¨ π (β-refl π y) β© β β¨ π p β©) , ((u : B) β Ο (x , r) u ββ¨ πΉ β© Ο (x , r) u) Γ ((u : B) β u ββ¨ πΉ β© Ο (x , r) u)) ββ¨ V β© (Ξ£ Ο κ (B β B) , Ξ£ Ο κ (B β B) , ((u : B) β Ο u ββ¨ πΉ β© Ο u) Γ ((u : B) β u ββ¨ πΉ β© Ο u)) ββ¨by-definitionβ© (Ξ£ Ο κ (B β B) , Ξ£ Ο κ (B β B) , (Ο ββ¨ B β πΉ β© Ο) Γ (id ββ¨ B β πΉ β© Ο)) ββ¨ VI β© (Ξ£ Ο κ (B β B) , Ξ£ (Ο , _) κ fan (B β πΉ) Ο , (id ββ¨ B β πΉ β© Ο)) ββ¨ VII β© ((Ξ£ Ο κ (B β B) , (id ββ¨ B β πΉ β© Ο))) ββ¨by-definitionβ© fan (B β πΉ) id β where r = β-refl π x πΉ = π r B = β¨ πΉ β© IV = Ξ£-bicong _ _ (β-sym (curry-uncurry fe')) (Ξ» _ β Ξ£-change-of-variable-β _ (β-sym (curry-uncurry fe'))) V = Ξ£-bicong _ _ (prop-indexed-product (x , β-refl π x) fe (is-ua-π x)) (Ξ» _ β Ξ£-change-of-variable-β _ (prop-indexed-product (x , β-refl π x) fe (is-ua-π x))) VI = Ξ£-cong (Ξ» _ β β-sym Ξ£-assoc) VII = Ξ£-cong (Ξ» - β prop-indexed-sum (center (II x -)) (singletons-are-props (II x -))) unbiased-lens-structure-is-a-property : is-univalent-refl-graph π β ((x y : β¨ π β©) (p : x ββ¨ π β© y) β is-univalent-refl-graph (π p)) β is-prop (unbiased-lens-structure π€' π₯' π π) unbiased-lens-structure-is-a-property is-ua-π is-ua-π = singletons-are-props (unbiased-lens-structure-is-contr is-ua-π is-ua-π)