0∨1 is not undefined it's ω

This commit is contained in:
rhiannon morris 2023-04-17 21:41:10 +02:00
parent 6428d39ce1
commit 682965eebd

View file

@ -81,15 +81,12 @@ compat pi Any = True
compat pi rh = pi == rh
||| "π ρ"
||| "π ρ"
|||
||| returns some quantity τ where π ≤ τ and ρ ≤ τ, if one exists.
public export
lub : Qty -> Qty -> Maybe Qty
lub p q =
if p == Any || q == Any then Just Any
else if p == q then Just p
else Nothing
lub p q = Just $ if p == q then p else Any
||| to maintain subject reduction, only 0 or 1 can occur