mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-27 13:40:15 +03:00
Add orBothFalse proof
This commit is contained in:
parent
af3c5fd454
commit
754f6af55c
@ -71,6 +71,17 @@ orNotTrue : (x : Bool) -> x || not x = True
|
||||
orNotTrue False = Refl
|
||||
orNotTrue True = Refl
|
||||
|
||||
export
|
||||
orBothFalse : {0 x, y : Bool} -> (0 prf : x || y = False) -> (x = False, y = False)
|
||||
orBothFalse prf = unerase $ orBothFalse' prf
|
||||
where
|
||||
unerase : (0 prf : (x = False, y = False)) -> (x = False, y = False)
|
||||
unerase (p, q) = (irrelevantEq p, irrelevantEq q)
|
||||
|
||||
orBothFalse' : {x, y : Bool} -> x || y = False -> (x = False, y = False)
|
||||
orBothFalse' {x = False} yFalse = (Refl, yFalse)
|
||||
orBothFalse' {x = True} trueFalse = absurd trueFalse
|
||||
|
||||
-- interaction & De Morgan's laws
|
||||
|
||||
export
|
||||
|
Loading…
Reference in New Issue
Block a user