Merge pull request #142 from HEPLean/Tensor_Move

refactor: Move tensors & index notation
This commit is contained in:
Joseph Tooby-Smith 2024-09-04 10:13:53 -04:00 committed by GitHub
commit da5e0e3f00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 78 additions and 70 deletions

View file

@ -72,32 +72,8 @@ import HepLean.SpaceTime.LorentzGroup.Orthochronous
import HepLean.SpaceTime.LorentzGroup.Proper
import HepLean.SpaceTime.LorentzGroup.Restricted
import HepLean.SpaceTime.LorentzGroup.Rotations
import HepLean.SpaceTime.LorentzTensor.Basic
import HepLean.SpaceTime.LorentzTensor.Contraction
import HepLean.SpaceTime.LorentzTensor.EinsteinNotation.Basic
import HepLean.SpaceTime.LorentzTensor.EinsteinNotation.IndexNotation
import HepLean.SpaceTime.LorentzTensor.EinsteinNotation.Lemmas
import HepLean.SpaceTime.LorentzTensor.EinsteinNotation.RisingLowering
import HepLean.SpaceTime.LorentzTensor.IndexNotation.Basic
import HepLean.SpaceTime.LorentzTensor.IndexNotation.ColorIndexList.Append
import HepLean.SpaceTime.LorentzTensor.IndexNotation.ColorIndexList.Basic
import HepLean.SpaceTime.LorentzTensor.IndexNotation.ColorIndexList.ContrPerm
import HepLean.SpaceTime.LorentzTensor.IndexNotation.ColorIndexList.Contraction
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.Basic
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.Color
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.Contraction
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.CountId
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.Duals
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.Equivs
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.Normalize
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.OnlyUniqueDuals
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.Subperm
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexString
import HepLean.SpaceTime.LorentzTensor.IndexNotation.TensorIndex
import HepLean.SpaceTime.LorentzTensor.MulActionTensor
import HepLean.SpaceTime.LorentzTensor.Real.Basic
import HepLean.SpaceTime.LorentzTensor.Real.IndexNotation
import HepLean.SpaceTime.LorentzTensor.RisingLowering
import HepLean.SpaceTime.LorentzVector.AsSelfAdjointMatrix
import HepLean.SpaceTime.LorentzVector.Basic
import HepLean.SpaceTime.LorentzVector.Contraction
@ -112,3 +88,27 @@ import HepLean.StandardModel.HiggsBoson.GaugeAction
import HepLean.StandardModel.HiggsBoson.PointwiseInnerProd
import HepLean.StandardModel.HiggsBoson.Potential
import HepLean.StandardModel.Representations
import HepLean.Tensors.Basic
import HepLean.Tensors.Contraction
import HepLean.Tensors.EinsteinNotation.Basic
import HepLean.Tensors.EinsteinNotation.IndexNotation
import HepLean.Tensors.EinsteinNotation.Lemmas
import HepLean.Tensors.EinsteinNotation.RisingLowering
import HepLean.Tensors.IndexNotation.Basic
import HepLean.Tensors.IndexNotation.ColorIndexList.Append
import HepLean.Tensors.IndexNotation.ColorIndexList.Basic
import HepLean.Tensors.IndexNotation.ColorIndexList.ContrPerm
import HepLean.Tensors.IndexNotation.ColorIndexList.Contraction
import HepLean.Tensors.IndexNotation.IndexList.Basic
import HepLean.Tensors.IndexNotation.IndexList.Color
import HepLean.Tensors.IndexNotation.IndexList.Contraction
import HepLean.Tensors.IndexNotation.IndexList.CountId
import HepLean.Tensors.IndexNotation.IndexList.Duals
import HepLean.Tensors.IndexNotation.IndexList.Equivs
import HepLean.Tensors.IndexNotation.IndexList.Normalize
import HepLean.Tensors.IndexNotation.IndexList.OnlyUniqueDuals
import HepLean.Tensors.IndexNotation.IndexList.Subperm
import HepLean.Tensors.IndexNotation.IndexString
import HepLean.Tensors.IndexNotation.TensorIndex
import HepLean.Tensors.MulActionTensor
import HepLean.Tensors.RisingLowering

View file

@ -5,7 +5,7 @@ Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzVector.Contraction
import HepLean.SpaceTime.LorentzVector.LorentzAction
import HepLean.SpaceTime.LorentzTensor.MulActionTensor
import HepLean.Tensors.MulActionTensor
/-!
# Real Lorentz tensors

View file

@ -3,8 +3,8 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.IndexNotation.TensorIndex
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexString
import HepLean.Tensors.IndexNotation.TensorIndex
import HepLean.Tensors.IndexNotation.IndexString
import HepLean.SpaceTime.LorentzTensor.Real.Basic
/-!

View file

@ -5,7 +5,7 @@ Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzVector.LorentzAction
import HepLean.SpaceTime.LorentzVector.Covariant
import HepLean.SpaceTime.LorentzTensor.Basic
import HepLean.Tensors.Basic
/-!
# Contractions of Lorentz vectors

View file

@ -3,7 +3,7 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.MulActionTensor
import HepLean.Tensors.MulActionTensor
/-!
# Contraction of indices

View file

@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import Mathlib.LinearAlgebra.StdBasis
import HepLean.SpaceTime.LorentzTensor.Basic
import HepLean.Tensors.Basic
import Mathlib.LinearAlgebra.DirectSum.Finsupp
import Mathlib.LinearAlgebra.Finsupp
/-!

View file

@ -3,9 +3,9 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.IndexNotation.TensorIndex
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexString
import HepLean.SpaceTime.LorentzTensor.EinsteinNotation.Basic
import HepLean.Tensors.IndexNotation.TensorIndex
import HepLean.Tensors.IndexNotation.IndexString
import HepLean.Tensors.EinsteinNotation.Basic
/-!
# Index notation for Einstein tensors

View file

@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.EinsteinNotation.IndexNotation
import HepLean.Tensors.EinsteinNotation.IndexNotation
/-!
# Lemmas regarding Einstein tensors

View file

@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import Mathlib.LinearAlgebra.StdBasis
import HepLean.SpaceTime.LorentzTensor.Basic
import HepLean.Tensors.Basic
import Mathlib.LinearAlgebra.DirectSum.Finsupp
import Mathlib.LinearAlgebra.Finsupp
/-!

View file

@ -3,9 +3,9 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.IndexNotation.ColorIndexList.Basic
import HepLean.SpaceTime.LorentzTensor.IndexNotation.ColorIndexList.Contraction
import HepLean.SpaceTime.LorentzTensor.Basic
import HepLean.Tensors.IndexNotation.ColorIndexList.Basic
import HepLean.Tensors.IndexNotation.ColorIndexList.Contraction
import HepLean.Tensors.Basic
import Init.Data.List.Lemmas
/-!

View file

@ -3,8 +3,8 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.Color
import HepLean.SpaceTime.LorentzTensor.Basic
import HepLean.Tensors.IndexNotation.IndexList.Color
import HepLean.Tensors.Basic
import Init.Data.List.Lemmas
/-!

View file

@ -3,9 +3,9 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.IndexNotation.ColorIndexList.Contraction
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.Subperm
import HepLean.SpaceTime.LorentzTensor.Basic
import HepLean.Tensors.IndexNotation.ColorIndexList.Contraction
import HepLean.Tensors.IndexNotation.IndexList.Subperm
import HepLean.Tensors.Basic
import Init.Data.List.Lemmas
/-!

View file

@ -3,10 +3,10 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.IndexNotation.ColorIndexList.Basic
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.Contraction
import HepLean.SpaceTime.LorentzTensor.Contraction
import HepLean.SpaceTime.LorentzTensor.Basic
import HepLean.Tensors.IndexNotation.ColorIndexList.Basic
import HepLean.Tensors.IndexNotation.IndexList.Contraction
import HepLean.Tensors.Contraction
import HepLean.Tensors.Basic
import Init.Data.List.Lemmas
/-!

View file

@ -6,7 +6,7 @@ Authors: Joseph Tooby-Smith
import Mathlib.Data.Set.Finite
import Mathlib.Logic.Equiv.Fin
import Mathlib.Data.Finset.Sort
import HepLean.SpaceTime.LorentzTensor.IndexNotation.Basic
import HepLean.Tensors.IndexNotation.Basic
/-!
# Index lists

View file

@ -3,9 +3,9 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.Contraction
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.OnlyUniqueDuals
import HepLean.SpaceTime.LorentzTensor.Basic
import HepLean.Tensors.IndexNotation.IndexList.Contraction
import HepLean.Tensors.IndexNotation.IndexList.OnlyUniqueDuals
import HepLean.Tensors.Basic
import Init.Data.List.Lemmas
/-!

View file

@ -3,7 +3,7 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.Equivs
import HepLean.Tensors.IndexNotation.IndexList.Equivs
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Data.Finset.Sort
import Mathlib.Tactic.FinCases

View file

@ -3,7 +3,7 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.Duals
import HepLean.Tensors.IndexNotation.IndexList.Duals
/-!
# Counting ids
@ -241,7 +241,7 @@ lemma countId_of_not_mem_withDualInOther (i : Fin l.length) (h : i ∉ l.withDua
have hjmem : j ∈ l2.val := List.mem_of_mem_filter hj
have hj' : l2.val.indexOf j < l2.length := List.indexOf_lt_length.mpr hjmem
rw [mem_withInDualOther_iff_exists] at h
simp at h
simp only [not_exists] at h
have hj' := h ⟨l2.val.indexOf j, hj'⟩
simp only [AreDualInOther, idMap, List.get_eq_getElem, List.getElem_indexOf] at hj'
simp only [List.get_eq_getElem, List.mem_filter, decide_eq_true_eq] at hj

View file

@ -3,7 +3,7 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.Basic
import HepLean.Tensors.IndexNotation.IndexList.Basic
/-!
# Indices which are dual in an index list

View file

@ -3,7 +3,7 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.CountId
import HepLean.Tensors.IndexNotation.IndexList.CountId
import Mathlib.Data.Finset.Sort
import Mathlib.Tactic.FinCases
/-!

View file

@ -3,7 +3,7 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.CountId
import HepLean.Tensors.IndexNotation.IndexList.CountId
import Mathlib.Data.Finset.Sort
import Mathlib.Tactic.FinCases
import Mathlib.Data.Fin.Tuple.Basic

View file

@ -3,8 +3,8 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.CountId
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.Contraction
import HepLean.Tensors.IndexNotation.IndexList.CountId
import HepLean.Tensors.IndexNotation.IndexList.Contraction
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Data.Finset.Sort
/-!

View file

@ -3,8 +3,8 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.CountId
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.Contraction
import HepLean.Tensors.IndexNotation.IndexList.CountId
import HepLean.Tensors.IndexNotation.IndexList.Contraction
import Mathlib.Algebra.Order.Ring.Nat
import Mathlib.Data.Finset.Sort
import Mathlib.Tactic.FinCases

View file

@ -3,7 +3,7 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.IndexNotation.TensorIndex
import HepLean.Tensors.IndexNotation.TensorIndex
/-!
# Strings of indices

View file

@ -3,12 +3,12 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.IndexNotation.IndexList.Color
import HepLean.SpaceTime.LorentzTensor.IndexNotation.ColorIndexList.ContrPerm
import HepLean.SpaceTime.LorentzTensor.IndexNotation.ColorIndexList.Append
import HepLean.SpaceTime.LorentzTensor.Basic
import HepLean.SpaceTime.LorentzTensor.RisingLowering
import HepLean.SpaceTime.LorentzTensor.Contraction
import HepLean.Tensors.IndexNotation.IndexList.Color
import HepLean.Tensors.IndexNotation.ColorIndexList.ContrPerm
import HepLean.Tensors.IndexNotation.ColorIndexList.Append
import HepLean.Tensors.Basic
import HepLean.Tensors.RisingLowering
import HepLean.Tensors.Contraction
/-!
# The structure of a tensor with a string of indices

View file

@ -3,7 +3,7 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.Basic
import HepLean.Tensors.Basic
import Mathlib.RepresentationTheory.Basic
/-!

View file

@ -3,7 +3,7 @@ Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.SpaceTime.LorentzTensor.MulActionTensor
import HepLean.Tensors.MulActionTensor
/-!
# Rising and Lowering of indices

View file

@ -11,9 +11,17 @@ import HepLean.Meta.TransverseTactics
/-!
This file checks for non-terminating `simp` tactics which do not appear as `simp only`.
## References
The content of this file is based on the following sources (released under the Apache 2.0 license).
- https://github.com/dwrensha/tryAtEachStep/blob/main/tryAtEachStep.lean
- https://github.com/lean-dojo/LeanDojo/blob/main/src/lean_dojo/data_extraction/ExtractData.lean
Modifications have been made to the original content of these files here.
See also:
- https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Memory.20increase.20in.20loops.2E
-/
open Lean Elab System