Merge pull request #142 from HEPLean/Tensor_Move
refactor: Move tensors & index notation
This commit is contained in:
commit
da5e0e3f00
29 changed files with 78 additions and 70 deletions
48
HepLean.lean
48
HepLean.lean
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
/-!
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
/-!
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
||||
/-!
|
|
@ -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
|
||||
/-!
|
||||
|
|
@ -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
|
||||
/-!
|
||||
|
|
@ -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
|
||||
/-!
|
||||
|
|
@ -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
|
||||
/-!
|
||||
|
|
@ -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
|
|
@ -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
|
||||
/-!
|
||||
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
||||
/-!
|
|
@ -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
|
|
@ -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
|
||||
/-!
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
||||
/-!
|
||||
|
|
@ -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
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue