Well-founded relations #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
A relation is well-founded if it can be used for induction: for each x, (∀ y, r y x → P y) → P x
implies P x. Well-founded relations can be used for induction and recursion, including
construction of fixed points in the space of dependent functions Π x : α , β x.
The predicate well_founded is defined in the core library. In this file we prove some extra lemmas
and provide a few new definitions: well_founded.min, well_founded.sup, and well_founded.succ,
and an induction principle well_founded.induction_bot.
If r is a well-founded relation, then any nonempty set has a minimal element
with respect to r.
A minimal element of a nonempty set in a well-founded order.
If you're working with a nonempty linear order, consider defining a
conditionally_complete_linear_order_bot instance via
well_founded.conditionally_complete_linear_order_with_bot and using Inf instead.
Equations
- H.min s h = classical.some _
The supremum of a bounded, well-founded order
A successor of an element x in a well-founded order is a minimal element y such that
x < y if one exists. Otherwise it is x itself.
Given a function f : α → β where β carries a well-founded <, this is an element of α
whose image under f is minimal in the sense of function.not_lt_argmin.
Equations
Given a function f : α → β where β carries a well-founded <, and a non-empty subset s
of α, this is an element of s whose image under f is minimal in the sense of
function.not_lt_argmin_on.
Equations
- function.argmin_on f h s hs = _.min s hs
Let r be a relation on α, let f : α → β be a function, let C : β → Prop, and
let bot : α. This induction principle shows that C (f bot) holds, given that
- some
athat is accessible byrsatisfiesC (f a), and - for each
bsuch thatf b ≠ f botandC (f b)holds, there iscsatisfyingr c bandC (f c).
Let r be a relation on α, let C : α → Prop and let bot : α.
This induction principle shows that C bot holds, given that
- some
athat is accessible byrsatisfiesC a, and - for each
b ≠ botsuch thatC bholds, there iscsatisfyingr c bandC c.
Let r be a well-founded relation on α, let f : α → β be a function,
let C : β → Prop, and let bot : α.
This induction principle shows that C (f bot) holds, given that
- some
asatisfiesC (f a), and - for each
bsuch thatf b ≠ f botandC (f b)holds, there iscsatisfyingr c bandC (f c).
Let r be a well-founded relation on α, let C : α → Prop, and let bot : α.
This induction principle shows that C bot holds, given that
- some
asatisfiesC a, and - for each
bthat satisfiesC b, there iscsatisfyingr c bandC c.
The naming is inspired by the fact that when r is transitive, it follows that bot is
the smallest element w.r.t. r that satisfies C.