data.two_pointingMathlib.Data.TwoPointing

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 -/
 import Data.Sum.Basic
-import Logic.Nontrivial
+import Logic.Nontrivial.Defs
 
 #align_import data.two_pointing from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
 
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2022 Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 -/
-import Mathbin.Data.Sum.Basic
-import Mathbin.Logic.Nontrivial
+import Data.Sum.Basic
+import Logic.Nontrivial
 
 #align_import data.two_pointing from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
-
-! This file was ported from Lean 3 source module data.two_pointing
-! leanprover-community/mathlib commit 448144f7ae193a8990cb7473c9e9a01990f64ac7
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.Sum.Basic
 import Mathbin.Logic.Nontrivial
 
+#align_import data.two_pointing from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
+
 /-!
 # Two-pointings
 
Diff
@@ -112,15 +112,19 @@ def pi : TwoPointing (α → β) where
 #align two_pointing.pi TwoPointing.pi
 -/
 
+#print TwoPointing.pi_fst /-
 @[simp]
 theorem pi_fst : (q.pi α).fst = const α q.fst :=
   rfl
 #align two_pointing.pi_fst TwoPointing.pi_fst
+-/
 
+#print TwoPointing.pi_snd /-
 @[simp]
 theorem pi_snd : (q.pi α).snd = const α q.snd :=
   rfl
 #align two_pointing.pi_snd TwoPointing.pi_snd
+-/
 
 end Pi
 
@@ -133,15 +137,19 @@ def prod : TwoPointing (α × β) where
 #align two_pointing.prod TwoPointing.prod
 -/
 
+#print TwoPointing.prod_fst /-
 @[simp]
 theorem prod_fst : (p.Prod q).fst = (p.fst, q.fst) :=
   rfl
 #align two_pointing.prod_fst TwoPointing.prod_fst
+-/
 
+#print TwoPointing.prod_snd /-
 @[simp]
 theorem prod_snd : (p.Prod q).snd = (p.snd, q.snd) :=
   rfl
 #align two_pointing.prod_snd TwoPointing.prod_snd
+-/
 
 #print TwoPointing.sum /-
 /-- The sum of two pointings. Keeps the first point from the left and the second point from the
@@ -151,15 +159,19 @@ protected def sum : TwoPointing (Sum α β) :=
 #align two_pointing.sum TwoPointing.sum
 -/
 
+#print TwoPointing.sum_fst /-
 @[simp]
 theorem sum_fst : (p.Sum q).fst = Sum.inl p.fst :=
   rfl
 #align two_pointing.sum_fst TwoPointing.sum_fst
+-/
 
+#print TwoPointing.sum_snd /-
 @[simp]
 theorem sum_snd : (p.Sum q).snd = Sum.inr q.snd :=
   rfl
 #align two_pointing.sum_snd TwoPointing.sum_snd
+-/
 
 #print TwoPointing.bool /-
 /-- The `ff`, `tt` two-pointing of `bool`. -/
Diff
@@ -112,23 +112,11 @@ def pi : TwoPointing (α → β) where
 #align two_pointing.pi TwoPointing.pi
 -/
 
-/- warning: two_pointing.pi_fst -> TwoPointing.pi_fst is a dubious translation:
-lean 3 declaration is
-  forall (α : Type.{u1}) {β : Type.{u2}} (q : TwoPointing.{u2} β) [_inst_1 : Nonempty.{succ u1} α], Eq.{max (succ u1) (succ u2)} (α -> β) (Prod.fst.{max u1 u2, max u1 u2} (α -> β) (α -> β) (TwoPointing.toProd.{max u1 u2} (α -> β) (TwoPointing.pi.{u1, u2} α β q _inst_1))) (Function.const.{succ u2, succ u1} β α (Prod.fst.{u2, u2} β β (TwoPointing.toProd.{u2} β q)))
-but is expected to have type
-  forall (α : Type.{u2}) {β : Type.{u1}} (q : TwoPointing.{u1} β) [_inst_1 : Nonempty.{succ u2} α], Eq.{max (succ u2) (succ u1)} (α -> β) (Prod.fst.{max u2 u1, max u2 u1} (α -> β) (α -> β) (TwoPointing.toProd.{max u2 u1} (α -> β) (TwoPointing.pi.{u2, u1} α β q _inst_1))) (Function.const.{succ u1, succ u2} β α (Prod.fst.{u1, u1} β β (TwoPointing.toProd.{u1} β q)))
-Case conversion may be inaccurate. Consider using '#align two_pointing.pi_fst TwoPointing.pi_fstₓ'. -/
 @[simp]
 theorem pi_fst : (q.pi α).fst = const α q.fst :=
   rfl
 #align two_pointing.pi_fst TwoPointing.pi_fst
 
-/- warning: two_pointing.pi_snd -> TwoPointing.pi_snd is a dubious translation:
-lean 3 declaration is
-  forall (α : Type.{u1}) {β : Type.{u2}} (q : TwoPointing.{u2} β) [_inst_1 : Nonempty.{succ u1} α], Eq.{max (succ u1) (succ u2)} (α -> β) (Prod.snd.{max u1 u2, max u1 u2} (α -> β) (α -> β) (TwoPointing.toProd.{max u1 u2} (α -> β) (TwoPointing.pi.{u1, u2} α β q _inst_1))) (Function.const.{succ u2, succ u1} β α (Prod.snd.{u2, u2} β β (TwoPointing.toProd.{u2} β q)))
-but is expected to have type
-  forall (α : Type.{u2}) {β : Type.{u1}} (q : TwoPointing.{u1} β) [_inst_1 : Nonempty.{succ u2} α], Eq.{max (succ u2) (succ u1)} (α -> β) (Prod.snd.{max u2 u1, max u2 u1} (α -> β) (α -> β) (TwoPointing.toProd.{max u2 u1} (α -> β) (TwoPointing.pi.{u2, u1} α β q _inst_1))) (Function.const.{succ u1, succ u2} β α (Prod.snd.{u1, u1} β β (TwoPointing.toProd.{u1} β q)))
-Case conversion may be inaccurate. Consider using '#align two_pointing.pi_snd TwoPointing.pi_sndₓ'. -/
 @[simp]
 theorem pi_snd : (q.pi α).snd = const α q.snd :=
   rfl
@@ -145,23 +133,11 @@ def prod : TwoPointing (α × β) where
 #align two_pointing.prod TwoPointing.prod
 -/
 
-/- warning: two_pointing.prod_fst -> TwoPointing.prod_fst is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (p : TwoPointing.{u1} α) (q : TwoPointing.{u2} β), Eq.{max (succ u1) (succ u2)} (Prod.{u1, u2} α β) (Prod.fst.{max u1 u2, max u1 u2} (Prod.{u1, u2} α β) (Prod.{u1, u2} α β) (TwoPointing.toProd.{max u1 u2} (Prod.{u1, u2} α β) (TwoPointing.prod.{u1, u2} α β p q))) (Prod.mk.{u1, u2} α β (Prod.fst.{u1, u1} α α (TwoPointing.toProd.{u1} α p)) (Prod.fst.{u2, u2} β β (TwoPointing.toProd.{u2} β q)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (p : TwoPointing.{u2} α) (q : TwoPointing.{u1} β), Eq.{max (succ u2) (succ u1)} (Prod.{u2, u1} α β) (Prod.fst.{max u2 u1, max u2 u1} (Prod.{u2, u1} α β) (Prod.{u2, u1} α β) (TwoPointing.toProd.{max u2 u1} (Prod.{u2, u1} α β) (TwoPointing.prod.{u2, u1} α β p q))) (Prod.mk.{u2, u1} α β (Prod.fst.{u2, u2} α α (TwoPointing.toProd.{u2} α p)) (Prod.fst.{u1, u1} β β (TwoPointing.toProd.{u1} β q)))
-Case conversion may be inaccurate. Consider using '#align two_pointing.prod_fst TwoPointing.prod_fstₓ'. -/
 @[simp]
 theorem prod_fst : (p.Prod q).fst = (p.fst, q.fst) :=
   rfl
 #align two_pointing.prod_fst TwoPointing.prod_fst
 
-/- warning: two_pointing.prod_snd -> TwoPointing.prod_snd is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (p : TwoPointing.{u1} α) (q : TwoPointing.{u2} β), Eq.{max (succ u1) (succ u2)} (Prod.{u1, u2} α β) (Prod.snd.{max u1 u2, max u1 u2} (Prod.{u1, u2} α β) (Prod.{u1, u2} α β) (TwoPointing.toProd.{max u1 u2} (Prod.{u1, u2} α β) (TwoPointing.prod.{u1, u2} α β p q))) (Prod.mk.{u1, u2} α β (Prod.snd.{u1, u1} α α (TwoPointing.toProd.{u1} α p)) (Prod.snd.{u2, u2} β β (TwoPointing.toProd.{u2} β q)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (p : TwoPointing.{u2} α) (q : TwoPointing.{u1} β), Eq.{max (succ u2) (succ u1)} (Prod.{u2, u1} α β) (Prod.snd.{max u2 u1, max u2 u1} (Prod.{u2, u1} α β) (Prod.{u2, u1} α β) (TwoPointing.toProd.{max u2 u1} (Prod.{u2, u1} α β) (TwoPointing.prod.{u2, u1} α β p q))) (Prod.mk.{u2, u1} α β (Prod.snd.{u2, u2} α α (TwoPointing.toProd.{u2} α p)) (Prod.snd.{u1, u1} β β (TwoPointing.toProd.{u1} β q)))
-Case conversion may be inaccurate. Consider using '#align two_pointing.prod_snd TwoPointing.prod_sndₓ'. -/
 @[simp]
 theorem prod_snd : (p.Prod q).snd = (p.snd, q.snd) :=
   rfl
@@ -175,23 +151,11 @@ protected def sum : TwoPointing (Sum α β) :=
 #align two_pointing.sum TwoPointing.sum
 -/
 
-/- warning: two_pointing.sum_fst -> TwoPointing.sum_fst is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (p : TwoPointing.{u1} α) (q : TwoPointing.{u2} β), Eq.{max (succ u1) (succ u2)} (Sum.{u1, u2} α β) (Prod.fst.{max u1 u2, max u1 u2} (Sum.{u1, u2} α β) (Sum.{u1, u2} α β) (TwoPointing.toProd.{max u1 u2} (Sum.{u1, u2} α β) (TwoPointing.sum.{u1, u2} α β p q))) (Sum.inl.{u1, u2} α β (Prod.fst.{u1, u1} α α (TwoPointing.toProd.{u1} α p)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (p : TwoPointing.{u2} α) (q : TwoPointing.{u1} β), Eq.{max (succ u2) (succ u1)} (Sum.{u2, u1} α β) (Prod.fst.{max u2 u1, max u2 u1} (Sum.{u2, u1} α β) (Sum.{u2, u1} α β) (TwoPointing.toProd.{max u2 u1} (Sum.{u2, u1} α β) (TwoPointing.sum.{u2, u1} α β p q))) (Sum.inl.{u2, u1} α β (Prod.fst.{u2, u2} α α (TwoPointing.toProd.{u2} α p)))
-Case conversion may be inaccurate. Consider using '#align two_pointing.sum_fst TwoPointing.sum_fstₓ'. -/
 @[simp]
 theorem sum_fst : (p.Sum q).fst = Sum.inl p.fst :=
   rfl
 #align two_pointing.sum_fst TwoPointing.sum_fst
 
-/- warning: two_pointing.sum_snd -> TwoPointing.sum_snd is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} (p : TwoPointing.{u1} α) (q : TwoPointing.{u2} β), Eq.{max (succ u1) (succ u2)} (Sum.{u1, u2} α β) (Prod.snd.{max u1 u2, max u1 u2} (Sum.{u1, u2} α β) (Sum.{u1, u2} α β) (TwoPointing.toProd.{max u1 u2} (Sum.{u1, u2} α β) (TwoPointing.sum.{u1, u2} α β p q))) (Sum.inr.{u1, u2} α β (Prod.snd.{u2, u2} β β (TwoPointing.toProd.{u2} β q)))
-but is expected to have type
-  forall {α : Type.{u2}} {β : Type.{u1}} (p : TwoPointing.{u2} α) (q : TwoPointing.{u1} β), Eq.{max (succ u2) (succ u1)} (Sum.{u2, u1} α β) (Prod.snd.{max u2 u1, max u2 u1} (Sum.{u2, u1} α β) (Sum.{u2, u1} α β) (TwoPointing.toProd.{max u2 u1} (Sum.{u2, u1} α β) (TwoPointing.sum.{u2, u1} α β p q))) (Sum.inr.{u2, u1} α β (Prod.snd.{u1, u1} β β (TwoPointing.toProd.{u1} β q)))
-Case conversion may be inaccurate. Consider using '#align two_pointing.sum_snd TwoPointing.sum_sndₓ'. -/
 @[simp]
 theorem sum_snd : (p.Sum q).snd = Sum.inr q.snd :=
   rfl

Changes in mathlib4

mathlib3
mathlib4
chore: reduce imports (#9830)

This uses the improved shake script from #9772 to reduce imports across mathlib. The corresponding noshake.json file has been added to #9772.

Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -3,8 +3,8 @@ Copyright (c) 2022 Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 -/
-import Mathlib.Data.Sum.Basic
 import Mathlib.Logic.Nontrivial.Defs
+import Mathlib.Logic.Nonempty
 
 #align_import data.two_pointing from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e"
 
chore: bump std (#7602)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -138,7 +138,7 @@ theorem sum_snd : (p.sum q).snd = Sum.inr q.snd :=
 
 /-- The `false`, `true` two-pointing of `Bool`. -/
 protected def bool : TwoPointing Bool :=
-  ⟨(false, true), Bool.ff_ne_tt⟩
+  ⟨(false, true), Bool.false_ne_true⟩
 #align two_pointing.bool TwoPointing.bool
 
 @[simp]
feat: split Logic.Nontrivial (#6959)

This continues reducing the import requirements for the basic algebraic hierarchy.

In combination with #6954 #6955 #6956 #6957, this reduces the imports for Mathlib.Algebra.Field.Defs from

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 -/
 import Mathlib.Data.Sum.Basic
-import Mathlib.Logic.Nontrivial
+import Mathlib.Logic.Nontrivial.Defs
 
 #align_import data.two_pointing from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e"
 
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -26,11 +26,11 @@ bipointed types. Two-pointed types form a full subcategory of those.
 
 open Function
 
-variable {α β : Type _}
+variable {α β : Type*}
 
 /-- Two-pointing of a type. This is a Type-valued termed `Nontrivial`. -/
 @[ext]
-structure TwoPointing (α : Type _) extends α × α where
+structure TwoPointing (α : Type*) extends α × α where
   /-- `fst` and `snd` are distinct terms -/
   fst_ne_snd : fst ≠ snd
   deriving DecidableEq
chore: remove 'Ported by' headers (#6018)

Briefly during the port we were adding "Ported by" headers, but only ~60 / 3000 files ended up with such a header.

I propose deleting them.

We could consider adding these uniformly via a script, as part of the great history rewrite...?

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,7 +2,6 @@
 Copyright (c) 2022 Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
-Ported by: Joël Riou
 -/
 import Mathlib.Data.Sum.Basic
 import Mathlib.Logic.Nontrivial
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -3,15 +3,12 @@ Copyright (c) 2022 Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 Ported by: Joël Riou
-
-! This file was ported from Lean 3 source module data.two_pointing
-! leanprover-community/mathlib commit fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.Sum.Basic
 import Mathlib.Logic.Nontrivial
 
+#align_import data.two_pointing from "leanprover-community/mathlib"@"fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e"
+
 /-!
 # Two-pointings
 
feat: simps uses fields of parent structures (#2042)
  • initialize_simps_projections now by default generates all projections of all parent structures, and doesn't generate the projections to those parent structures.
  • You can also rename a nested projection directly, without having to specify intermediate parent structures
  • Added the option to turn the default behavior off (done in e.g. TwoPointed)

Internal changes:

  • Move most declarations to the Simps namespace, and shorten their names
  • Restructure ParsedProjectionData to avoid the bug reported here (and to another bug where it seemed that the wrong data was inserted in ParsedProjectionData, but it was hard to minimize because of all the crashes). If we manage to fix the bug in that Zulip thread, I'll see if I can track down the other bug in commit 97454284

Co-authored-by: Johan Commelin <johan@commelin.net>

Diff
@@ -42,6 +42,8 @@ structure TwoPointing (α : Type _) extends α × α where
 #align two_pointing.ext TwoPointing.ext
 #align two_pointing.ext_iff TwoPointing.ext_iff
 
+initialize_simps_projections TwoPointing (+toProd, -fst, -snd)
+
 namespace TwoPointing
 
 variable (p : TwoPointing α) (q : TwoPointing β)
chore: add missing #align statements (#1902)

This PR is the result of a slight variant on the following "algorithm"

  • take all mathlib 3 names, remove _ and make all uppercase letters into lowercase
  • take all mathlib 4 names, remove _ and make all uppercase letters into lowercase
  • look for matches, and create pairs (original_lean3_name, OriginalLean4Name)
  • for pairs that do not have an align statement:
    • use Lean 4 to lookup the file + position of the Lean 4 name
    • add an #align statement just before the next empty line
  • manually fix some tiny mistakes (e.g., empty lines in proofs might cause the #align statement to have been inserted too early)
Diff
@@ -39,6 +39,8 @@ structure TwoPointing (α : Type _) extends α × α where
   fst_ne_snd : fst ≠ snd
   deriving DecidableEq
 #align two_pointing TwoPointing
+#align two_pointing.ext TwoPointing.ext
+#align two_pointing.ext_iff TwoPointing.ext_iff
 
 namespace TwoPointing
 
@@ -53,6 +55,7 @@ theorem snd_ne_fst : p.snd ≠ p.fst :=
 def swap : TwoPointing α :=
   ⟨(p.snd, p.fst), p.snd_ne_fst⟩
 #align two_pointing.swap TwoPointing.swap
+#align two_pointing.swap_to_prod TwoPointing.swap_toProd
 
 theorem swap_fst : p.swap.fst = p.snd := rfl
 #align two_pointing.swap_fst TwoPointing.swap_fst
chore: add source headers to ported theory files (#1094)

The script used to do this is included. The yaml file was obtained from https://raw.githubusercontent.com/wiki/leanprover-community/mathlib/mathlib4-port-status.md

Diff
@@ -3,6 +3,11 @@ Copyright (c) 2022 Yaël Dillies. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yaël Dillies
 Ported by: Joël Riou
+
+! This file was ported from Lean 3 source module data.two_pointing
+! leanprover-community/mathlib commit fc2ed6f838ce7c9b7c7171e58d78eaf7b438fb0e
+! Please do not edit these lines, except to modify the commit id
+! if you have ported upstream changes.
 -/
 import Mathlib.Data.Sum.Basic
 import Mathlib.Logic.Nontrivial

Dependencies 10

11 files ported (100.0%)
4468 lines ported (100.0%)

All dependencies are ported!