Left-biased choice of partial values #
Part.or is the Part analogue of Option.or: p.or q is defined
wherever either argument is, with the left taking precedence.
Noncomputable, since it decides p.Dom; Flat.or is its computable
twin on Option-carried partial values. Also the order facts of the
flat domain: definedness is monotone (dom_mono), descent without
domain growth is equality (eq_of_le_of_dom), and two partial values
are bounded above exactly when they agree wherever both are defined
(compat_iff), with p.or q the witnessing bound. [UPSTREAM]
candidates for Mathlib/Data/Part.lean.
theorem
Part.le_or_right_of_agree
{α : Type u_1}
{p q : Part α}
(hag : ∀ (a b : α), a ∈ p → b ∈ q → a = b)
:
theorem
Part.compat_iff
{α : Type u_1}
{p q : Part α}
:
Compat p q ↔ ∀ (a b : α), a ∈ p → b ∈ q → a = b
Two partial values are compatible — bounded above in the flat order — exactly when they agree wherever both are defined.