Zulip Chat Archive
Stream: mathlib4
Topic: Fixing Finset.induction
Jeremy Tan (Apr 14 2023 at 11:09):
How do I get the Finset.induction
line here to work and the interβ
function to compile?
import Mathlib.Analysis.Convex.Extreme
import Mathlib.Analysis.Convex.Function
import Mathlib.Topology.Algebra.Module.Basic
import Mathlib.Topology.Order.Basic
open Classical Affine BigOperators Set
section PreorderSemiring
variable (π : Type _) {E : Type _} [TopologicalSpace π] [Semiring π] [Preorder π] [AddCommMonoid E]
[TopologicalSpace E] [Module π E] {A B : Set E}
def IsExposed (A B : Set E) : Prop :=
B.Nonempty β β l : E βL[π] π, B = { x β A | β y β A, l y β€ l x }
end PreorderSemiring
variable {π : Type _} {E : Type _} [TopologicalSpace π] [OrderedRing π] [AddCommMonoid E]
[TopologicalSpace E] [Module π E] {A B : Set E}
theorem interβ [ContinuousAdd π] {F : Finset (Set E)} (hF : F.Nonempty)
(hAF : β B β F, IsExposed π A B) : IsExposed π A (ββ F) := by
revert hF F
refine' Finset.induction _ _ -- here
Β· rintro h
exfalso
exact not_nonempty_empty h
rintro C F _ hF _ hCF
rw [Finset.coe_insert, interβ_insert]
obtain rfl | hFnemp := F.eq_empty_or_nonempty
Β· rw [Finset.coe_empty, interβ_empty, inter_univ]
exact hCF C (Finset.mem_singleton_self C)
exact (hCF C (Finset.mem_insert_self C F)).inter
(hF hFnemp fun B hB => hCF B (Finset.mem_insert_of_mem hB))
Eric Wieser (Apr 14 2023 at 11:11):
I would recommend induction F using finset.induction
(and dropping the revert
too)
Jeremy Tan (Apr 15 2023 at 16:24):
It's from !4#3453. With the original code (refine' Finset.induction _ _
) I get the error message
type mismatch
fun s => Finset.induction ?m.24263 ?m.24264 s
has type
Finset ?m.24260 β (β (B : Set E), B β Fβ β IsExposed π A B) β IsExposed π A (ββ βFβ) : Prop
but is expected to have type
Finset.Nonempty Fβ β (β (B : Set E), B β Fβ β IsExposed π A B) β IsExposed π A (ββ βFβ) : Prop
the following variables have been introduced by the implicit lambda feature
Fβ : Finset (Set E)
you can disable implicit lambdas using `@` or writing a lambda expression with `{}` or `[]` binder annotations.
which suggests to me that deleting an implicit variable somewhere should solve everything, but how do I do that?
Jeremy Tan (Apr 15 2023 at 16:26):
Or how can I go on with the code I already have in !4#3453?
Eric Wieser (Apr 15 2023 at 16:49):
Did you try my suggestion above?
Last updated: Dec 20 2023 at 11:08 UTC