File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -694,6 +694,21 @@ protected theorem surjective (e : r ≃r s) : Surjective e :=
694
694
theorem eq_iff_eq (f : r ≃r s) {a b} : f a = f b ↔ a = b :=
695
695
f.injective.eq_iff
696
696
697
+ /-- Copy of a `RelIso` with a new `toFun` and `invFun` equal to the old ones.
698
+ Useful to fix definitional equalities. -/
699
+ def copy (e : r ≃r s) (f : α → β) (g : β → α) (hf : f = e) (hg : g = e.symm) : r ≃r s where
700
+ toFun := f
701
+ invFun := g
702
+ left_inv _ := by simp [hf, hg]
703
+ right_inv _ := by simp [hf, hg]
704
+ map_rel_iff' := by simp [hf, e.map_rel_iff]
705
+
706
+ @[simp, norm_cast]
707
+ lemma coe_copy (e : r ≃r s) (f : α → β) (g : β → α) (hf hg) : e.copy f g hf hg = f := rfl
708
+
709
+ lemma copy_eq (e : r ≃r s) (f : α → β) (g : β → α) (hf hg) : e.copy f g hf hg = e :=
710
+ DFunLike.coe_injective hf
711
+
697
712
/-- Any equivalence lifts to a relation isomorphism between `s` and its preimage. -/
698
713
protected def preimage (f : α ≃ β) (s : β → β → Prop ) : f ⁻¹'o s ≃r s :=
699
714
⟨f, Iff.rfl⟩
You can’t perform that action at this time.
0 commit comments