add Decidable-related stuff
This commit is contained in:
parent
84e524c978
commit
28055c0f39
5 changed files with 64 additions and 25 deletions
|
@ -39,12 +39,12 @@ times pi One = pi
|
|||
times Any Any = Any
|
||||
|
||||
public export
|
||||
data Compat3 : Three -> Three -> Type where
|
||||
CmpRefl : Compat3 pi pi
|
||||
CmpAny : Compat3 pi Any
|
||||
data Compat3 : Rel Three where
|
||||
CmpRefl : Compat3 rh rh
|
||||
CmpAny : Compat3 rh Any
|
||||
|
||||
public export
|
||||
compat3 : (pi, rh : Three) -> Dec (pi `Compat3` rh)
|
||||
compat3 : Dec2 Compat3
|
||||
compat3 pi rh with (decEq pi rh)
|
||||
compat3 pi pi | Yes Refl = Yes CmpRefl
|
||||
compat3 pi rh | No ne with (decEq rh Any)
|
||||
|
@ -55,23 +55,23 @@ compat3 pi rh with (decEq pi rh)
|
|||
|
||||
|
||||
public export
|
||||
data IsSubj3 : Three -> Type where
|
||||
data IsSubj3 : Pred Three where
|
||||
SZero : IsSubj3 Zero
|
||||
SOne : IsSubj3 One
|
||||
|
||||
public export
|
||||
isSubj3 : (pi : Three) -> Dec (IsSubj3 pi)
|
||||
isSubj3 : Dec1 IsSubj3
|
||||
isSubj3 Zero = Yes SZero
|
||||
isSubj3 One = Yes SOne
|
||||
isSubj3 Any = No $ \case _ impossible
|
||||
|
||||
|
||||
public export
|
||||
data IsGlobal3 : Three -> Type where
|
||||
data IsGlobal3 : Pred Three where
|
||||
GZero : IsGlobal3 Zero
|
||||
GAny : IsGlobal3 Any
|
||||
|
||||
isGlobal3 : (pi : Three) -> Dec (IsGlobal3 pi)
|
||||
isGlobal3 : Dec1 IsGlobal3
|
||||
isGlobal3 Zero = Yes GZero
|
||||
isGlobal3 One = No $ \case _ impossible
|
||||
isGlobal3 Any = Yes GAny
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue