I play with observational type theory.
Here the equality π-types ( πis lowercase Π, i.e. π A Bis the code for (x : A) -> B x), defined mutually with coercion:
π A₁ B₁ ≃ π A₂ B₂ = σ (A₂ ≃ A₁) λ P -> π _ λ x -> B₁ (coerce P x) ≃ B₂ x
and the equality of functions defined accordingly ( σ- lower case Σ):
_≅_ {A = π A₁ B₁} {π A₂ B₂} f₁ f₂ = σ (A₂ ≃ A₁) λ P -> π _ λ x -> f₁ (coerce P x) ≅ f₂ x
So, instead of “equal functions mapping equal inputs to equal outputs”, we have “equal functions defining equal inputs by definition by equal outputs”.
In this setting coherence
coerce : ∀ {α β} {A : Univ α} {B : Univ β} -> ⟦ A ≃ B ⟧ᵀ -> ⟦ A ⟧ᵀ -> ⟦ B ⟧ᵀ
coherence : ∀ {α β} {A : Univ α} {B : Univ β}
-> (P : ⟦ A ≃ B ⟧ᵀ) -> (x : ⟦ A ⟧ᵀ) -> ⟦ x ≅ coerce P x ⟧ᵀ
( Univ 0is Prop, Univ (suc α)is Type α)
provable. The only thing I needed to postulate was
postulate ≃-refl : ∀ {α} -> (A : Univ α) -> ⟦ A ≃ A ⟧ᵀ
, A ≃ A ( , trustMe _≟_ : ∀ {α} {A : Set α} (x y : A) -> Maybe (x ≡ y)).
-, subst .
- ? - ? . , ? - , coherence, , ?
( , ).