Skip to content

Commit

Permalink
feat(data/indicator_function): eq_self_of_superset (#6829)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamindavidson committed Mar 23, 2021
1 parent aadd853 commit ee5e9fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/data/indicator_function.lean
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ ite_eq_left_iff.trans $ by rw [@eq_comm _ (f a)]
@[simp] lemma indicator_eq_self : s.indicator f = f ↔ support f ⊆ s :=
by simp only [funext_iff, subset_def, mem_support, indicator_apply_eq_self, not_imp_comm]

lemma indicator_eq_self_of_superset (h1 : s.indicator f = f) (h2 : s ⊆ t) : t.indicator f = f :=
by { rw indicator_eq_self at h1 ⊢, exact subset.trans h1 h2 }

@[simp] lemma indicator_support : (support f).indicator f = f :=
indicator_eq_self.2 $ subset.refl _

Expand Down

0 comments on commit ee5e9fb

Please sign in to comment.