Last active
July 25, 2022 22:23
-
-
Save bond15/4dc8d7a6a5b7afb931c1e21047eddd9c to your computer and use it in GitHub Desktop.
Don't match on Set
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module foo where | |
data ⊘ : Set where | |
data ⊤ : Set where tt : ⊤ | |
open import Cubical.Data.Bool | |
open import Cubical.Foundations.Isomorphism | |
open import Cubical.Foundations.Prelude | |
postulate | |
f : Set → Bool | |
reduction₁ : f (⊤ × ⊤) ≡ true | |
reduction₂ : f (⊤) ≡ false | |
f' : Set → Set | |
reduction₃ : f' (⊤ × ⊤) ≡ ⊤ | |
reduciton₄ : f' (⊤) ≡ ⊘ | |
⊤≡⊤×⊤ : ⊤ ≡ ⊤ × ⊤ | |
⊤≡⊤×⊤ = isoToPath (iso (λ _ → tt , tt) (λ x → tt) (λ{ (tt , tt) → refl}) λ{tt → refl}) | |
oops : true ≡ false | |
oops = true ≡⟨ sym reduction₁ ⟩ | |
f (⊤ × ⊤) ≡⟨ cong f (sym ⊤≡⊤×⊤) ⟩ | |
f ⊤ ≡⟨ reduction₂ ⟩ | |
false ∎ | |
oops' : ⊤ ≡ ⊘ | |
oops' = ⊤ ≡⟨ sym reduction₃ ⟩ | |
f' (⊤ × ⊤) ≡⟨ cong f' (sym ⊤≡⊤×⊤) ⟩ | |
f' ⊤ ≡⟨ reduciton₄ ⟩ | |
⊘ ∎ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment