Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adaptations for nightly-2024-01-24 #10002

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Mathlib/Tactic/TFAE.lean
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ partial def proveChain (i : ℕ) (is : List ℕ) (P : Q(Prop)) (l : Q(List Prop)
match l with
| ~q([]) => return q(Chain.nil)
| ~q($P' :: $l') =>
let i' :: is' := is | unreachable!
-- `id` is a workaround for https://github.com/leanprover-community/quote4/issues/30
let i' :: is' := id is | unreachable!
have cl' : Q(Chain (· → ·) $P' $l') := ← proveChain i' is' q($P') q($l')
let p ← proveImpl hyps atoms i i' P P'
return q(Chain.cons $p $cl')
Expand All @@ -139,7 +140,8 @@ partial def proveGetLastDImpl (i i' : ℕ) (is : List ℕ) (P P' : Q(Prop)) (l :
match l with
| ~q([]) => proveImpl hyps atoms i' i P' P
| ~q($P'' :: $l') =>
let i'' :: is' := is | unreachable!
-- `id` is a workaround for https://github.com/leanprover-community/quote4/issues/30
let i'' :: is' := id is | unreachable!
proveGetLastDImpl i i'' is' P P'' l'

/-- Attempt to prove a statement of the form `TFAE [P₁, P₂, ...]`. -/
Expand All @@ -148,7 +150,8 @@ def proveTFAE (is : List ℕ) (l : Q(List Prop)) : MetaM Q(TFAE $l) := do
| ~q([]) => return q(tfae_nil)
| ~q([$P]) => return q(tfae_singleton $P)
| ~q($P :: $P' :: $l') =>
let i :: i' :: is' := is | unreachable!
-- `id` is a workaround for https://github.com/leanprover-community/quote4/issues/30
let i :: i' :: is' := id is | unreachable!
let c ← proveChain hyps atoms i (i'::is') P q($P' :: $l')
let il ← proveGetLastDImpl hyps atoms i i' is' P P' l'
return q(tfae_of_cycle $c $il)
Expand Down
2 changes: 1 addition & 1 deletion lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:nightly-2024-01-23
leanprover/lean4:nightly-2024-01-24