identity proof

This commit is contained in:
Michael Zhang 2022-11-22 16:56:52 -06:00
parent 22cac47a76
commit 74669bee03
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B

View file

@ -4,9 +4,9 @@ module Lemma641 where
open import Level
open import Cubical.Foundations.Prelude
using (_≡_; refl; _∙_; _≡⟨⟩_; _≡⟨_⟩_; _∎; cong; sym; fst; snd; _,_; ~_)
using (_≡_; refl; _∙_; _≡⟨_⟩_; _∎; cong; sym; fst; snd; _,_; ~_)
open import Cubical.Data.Empty as
open import Cubical.Foundations.Equiv using (isEquiv; equiv-proof)
open import Cubical.Foundations.Equiv using (isEquiv; equivProof; equiv-proof)
open import Relation.Nullary using (¬_)
open import Relation.Binary.Core using (Rel)
@ -29,9 +29,40 @@ bool-id≡bool : (b : Bool) → bool-id b ≡ b
bool-id≡bool true _ = true
bool-id≡bool false _ = false
-- record isEquiv { '} {A : Set } {B : Set '} (f : A → B) : Set (') where
-- no-eta-equality
-- field
-- equiv-proof : (y : B) → isContr (fiber f y)
-- isEquiv bool-id
-- A = Bool
-- B = Bool
-- f : Bool → Bool
-- equiv-proof : (y : B = Bool) → isContr (fiber f y)
-- fiber : ∀ { '} {A : Set } {B : Set '} (f : A → B) (y : B) → Set (')
-- fiber {A = A} f y = Σ A \ x → f x ≡ y
-- fiber f y
-- f : Bool → Bool
-- A = Bool
-- B = Bool
-- y : Bool = y
-- fiber f y = Σ Bool \ x → f x ≡ y
-- isContr : ∀ {} → Set → Set
-- isContr A = Σ A \ x → (∀ y → x ≡ y)
-- isContr (Σ Bool \ x → f x ≡ y)
-- = Σ (Σ Bool \ x → f x ≡ y) \ x → (∀ y → x ≡ y)
--
-- .fst = (x , f x ≡ y)
-- .snd = (∀ y → .fst ≡ y)
bool-id-is-equiv : isEquiv bool-id
bool-id-is-equiv .equiv-proof y .fst = ( y , bool-id≡bool y )
bool-id-is-equiv .equiv-proof y .snd (y , p) i = let b = p (~ i) in (? , bool-id≡bool y)
bool-id-is-equiv .equiv-proof y = ?
-- First is an element of bool-id ≡ bool
-- bool-id-is-equiv .equiv-proof y .fst = ( y , bool-id≡bool y )
-- -- Second is a proof that any other inhabitant of bool-id ≡ bool is the same as the above
-- bool-id-is-equiv .equiv-proof y .snd = ?
bool-flip : Bool Bool
bool-flip true = false
@ -80,8 +111,8 @@ consequence x p loop≡refl = p
refl-x x
lemma641 : loop refl
lemma641 x = ?
-- lemma641 : loop ≢ refl
-- lemma641 x = ?
-- https://serokell.io/blog/playing-with-negation