lean4-htt/tests/lean/1639.lean

20 lines
600 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

def some_lets :
| 0 v := v
| (nat.succ n) v := let k := some_lets n v + some_lets n v in some_lets n k
def some_unfolded_lets (n : ) : Σ' v : , v = some_lets 5 n :=
begin
constructor; unfold some_lets; constructor
end
meta def foo : tactic unit :=
do [g] <- tactic.get_goals,
tactic.to_expr (``(1)) >>= tactic.unify g
def some_lifted_lets (n : ) : Σ' (v : ), v = psigma.fst (some_unfolded_lets n) :=
begin
constructor; unfold some_unfolded_lets psigma.fst; symmetry; transitivity; symmetry;
{
foo -- unify_reify_rhs_to_let_in
}
end