@@ -23,14 +23,40 @@ choose : (b : Bool) -> Either (So b) (So (not b))
2323choose True = Left Oh
2424choose False = Right Oh
2525
26+ -- ------------------------------------------------------------------------------
27+ -- Absurd- and negation-related properties
28+ -- ------------------------------------------------------------------------------
29+
2630||| Absurd when you have proof that both `b` and `not b` is true.
2731export
2832soAbsurd : So b -> So (not b) -> Void
29- soAbsurd sb snb with (sb)
30- | Oh = uninhabited snb
33+ soAbsurd Oh = uninhabited
34+
35+ ||| Absurd when you have a proof of both `b` and `not b` (with something else).
36+ export
37+ soConjAbsurd : So b -> So (not b && c) -> Void
38+ soConjAbsurd Oh = uninhabited
3139
3240||| Transmission between usage of value-level `not` and type-level `Not`.
3341export
3442soNotToNotSo : So (not b) -> Not (So b)
3543soNotToNotSo = flip soAbsurd
3644
45+ -- ------------------------------------------------------------------------------
46+ -- - Operations for `So` of conjunction
47+ -- ------------------------------------------------------------------------------
48+
49+ ||| Given proofs of two properties you have a proof of a conjunction.
50+ export
51+ (&& ) : So b -> So c -> So (b && c)
52+ Oh && Oh = Oh
53+
54+ ||| A proof of the right side of a conjunction given a proof of the left side.
55+ export
56+ takeSoConjPart : So b -> So (b && c) -> So c
57+ takeSoConjPart Oh Oh = Oh
58+
59+ ||| Splits the proof of a conjunction to a pair of proofs for each part.
60+ export
61+ splitSoConj : So (b && c) -> (So b, So c)
62+ splitSoConj {b= True } Oh = (Oh , Oh )
0 commit comments