@@ -23,14 +23,42 @@ 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
2933soAbsurd sb snb with (sb)
3034 | Oh = uninhabited snb
3135
36+ ||| Absurd when you have a proof of both `b` and `not b` (with something else).
37+ export
38+ soConjAbsurd : So b -> So (not b && c) -> Void
39+ soConjAbsurd sb sbc with (sb)
40+ | Oh = uninhabited sbc
41+
3242||| Transmission between usage of value-level `not` and type-level `Not`.
3343export
3444soNotToNotSo : So (not b) -> Not (So b)
3545soNotToNotSo = flip soAbsurd
3646
47+ -- ------------------------------------------------------------------------------
48+ -- - Operations for `So` of conjunction
49+ -- ------------------------------------------------------------------------------
50+
51+ ||| Given proofs of two properties you have a proof of a conjunction.
52+ export
53+ (&& ) : So b -> So c -> So (b && c)
54+ Oh && Oh = Oh
55+
56+ ||| A proof of the right side of a conjunction given a proof of the left side.
57+ export
58+ takeSoConjPart : So b -> So (b && c) -> So c
59+ takeSoConjPart Oh Oh = Oh
60+
61+ ||| Splits the proof of a conjunction to a pair of proofs for each part.
62+ export
63+ splitSoConj : So (b && c) -> (So b, So c)
64+ splitSoConj {b= True } Oh = (Oh , Oh )
0 commit comments