Skip to content

Demos.ContraX

Inconsistency in first formalization attempt

{-# OPTIONS --cubical-compatible --exact-split --safe #-}

open import Overture using ( π“ž ; π“₯ ; Signature )

module Demos.ContraX {𝑆 : Signature π“ž π“₯} where
open import  Data.Unit.Polymorphic                  using ( ⊀ ; tt )
open import  Data.Empty.Polymorphic                 using ( βŠ₯ )
open import  Level                                  using ( 0β„“ )
open import  Relation.Binary                        using ( Setoid )
open import  Relation.Binary.PropositionalEquality  using ( setoid )
open import  Data.Product                           using ( Ξ£-syntax )
open import  Function    renaming (Func to _⟢_ )    using ()


open import Overture                 using ( proj₁ ; projβ‚‚ )
open import Setoid.Algebras {𝑆 = 𝑆}  using ( Algebra ; 𝔻[_] )
open import Setoid.Functions         using (IsSurjective ; Image_βˆ‹_)

open Algebra
_β† _ : Set β†’ Algebra 0β„“ 0β„“ β†’ _
X β†  𝑨 = Ξ£[ h ∈ (setoid X ⟢ 𝔻[ 𝑨 ])] IsSurjective h

myA : Setoid 0β„“ 0β„“
myA = record  { Carrier = ⊀
              ; _β‰ˆ_ = Ξ» x x₁ β†’ ⊀
              ; isEquivalence = record  { refl = tt
                                        ; sym = Ξ» _ β†’ tt
                                        ; trans = Ξ» _ _ β†’ tt } }

myAlg : Algebra _ _
myAlg = record { Domain = myA ; Interp = _ }

contradiction : (βˆ€ X 𝑨 β†’ X β†  𝑨) β†’ βŠ₯
contradiction h1 = ex falso
 where
 h : Ξ£[ h ∈ (setoid βŠ₯ ⟢ 𝔻[ myAlg ])] IsSurjective h
 h = h1 βŠ₯ myAlg

 falso : Image (proj₁ h) βˆ‹ tt
 falso = (projβ‚‚ h)

 ex : Image (proj₁ h) βˆ‹ tt β†’ βŠ₯
 ex (Image_βˆ‹_.eq a x) = a