lift tactic #
This file defines the lift
tactic, allowing the user to lift elements from one type to another
under a specified condition.
Tags #
lift, tactic
@[class]
- coe : β → α
- cond : α → Prop
- prf : ∀ (x : α), can_lift.cond β x → (∃ (y : β), can_lift.coe y = x)
A class specifying that you can lift elements from α
to β
assuming cond
is true.
Used by the tactic lift
.
Instances
- nat.can_lift
- pi.can_lift
- pi_subtype.can_lift
- pi_subtype.can_lift'
- with_bot.can_lift
- with_top.can_lift
- set.pi_set_coe.can_lift
- set.pi_set_coe.can_lift'
- set.set_coe.can_lift
- set.set.can_lift
- units.can_lift
- with_one.can_lift
- with_zero.can_lift
- order_hom.can_lift
- list.can_lift
- multiset.can_lift
- finset.pi_finset_coe.can_lift
- finset.pi_finset_coe.can_lift'
- finset.finset_coe.can_lift
- finset.can_lift
- nat.can_lift_pnat
- int.can_lift_pnat
- rat.int.can_lift
- set.finset.can_lift
- finsupp.can_lift
- nnreal.can_lift
- ennreal.nnreal.can_lift
@[protected, instance]
Equations
- nat.can_lift = {coe := coe coe_to_lift, cond := λ (n : ℤ), 0 ≤ n, prf := nat.can_lift._proof_1}
@[protected, instance]
def
pi.can_lift
(ι : Type u_1)
(α : ι → Type u_2)
(β : ι → Type u_3)
[Π (i : ι), can_lift (α i) (β i)] :
can_lift (Π (i : ι), α i) (Π (i : ι), β i)
Enable automatic handling of pi types in can_lift
.
Equations
- pi.can_lift ι α β = {coe := λ (f : Π (i : ι), β i) (i : ι), can_lift.coe (f i), cond := λ (f : Π (i : ι), α i), ∀ (i : ι), can_lift.cond (β i) (f i), prf := _}
@[protected, instance]
def
pi_subtype.can_lift
(ι : Type u_1)
(α : ι → Type u_2)
[ne : ∀ (i : ι), nonempty (α i)]
(p : ι → Prop) :
@[protected, instance]
Equations
- pi_subtype.can_lift' ι α p = pi_subtype.can_lift ι (λ (_x : ι), α) p