theorem
WithBot.lt_succ
{α : Type u}
[Preorder α]
[OrderBot α]
[SuccOrder α]
[NoMaxOrder α]
(x : WithBot α)
:
def
HasFresh.ofSucc
{α : Type u}
[Inhabited α]
[SemilatticeSup α]
(f : α → α)
(hf : ∀ (x : α), x < f x)
:
HasFresh α
Construct a fresh element given a function f
with x < f x
.
Equations
Instances For
ℕ
has a computable fresh function.
Equations
- instHasFreshNat = HasFresh.ofSucc (fun (x : ℕ) => x + 1) Nat.lt_add_one
ℤ
has a computable fresh function.
Equations
- instHasFreshInt = HasFresh.ofSucc (fun (x : ℤ) => x + 1) Int.lt_succ
ℚ
has a computable fresh function.
Equations
- instHasFreshRat = HasFresh.ofSucc (fun (x : ℚ) => x + 1) instHasFreshRat._proof_1
If α
has a computable fresh function, then so does Finset α
.
Equations
- instHasFreshFinsetOfDecidableEq = HasFresh.ofSucc (fun (s : Finset α) => insert (fresh s) s) ⋯
If α
is inhabited, then Multiset α
has a computable fresh function.
Equations
- instHasFreshMultisetOfDecidableEqOfInhabited = HasFresh.ofSucc (fun (s : Multiset α) => default ::ₘ s) ⋯
ℕ → ℕ
has a computable fresh function.
Equations
- instHasFreshForallNat = HasFresh.ofSucc (fun (f : ℕ → ℕ) (x : ℕ) => f x + 1) instHasFreshForallNat._proof_1