pith. machine review for the scientific record. sign in
def

metric_from_rrf

definition
show as:
view math explainer →
module
IndisputableMonolith.Relativity.Geometry.Metric
domain
Relativity
line
35 · github
papers citing
none yet

open explainer

Read the cached plain-language explainer.

open lean source

IndisputableMonolith.Relativity.Geometry.Metric on GitHub at line 35.

browse module

All declarations in this module, on Recognition.

explainer page

A cached Ask Recognition explainer exists for this declaration.

open explainer

depends on

formal source

  32      · have h_rev : low 1 ≠ low 0 := fun heq => h heq.symm
  33        rw [if_neg h, if_neg h_rev] }
  34
  35noncomputable def metric_from_rrf (psi : (Fin 4 → ℝ) → ℝ) (k : ℝ) : MetricTensor :=
  36  { g := fun x _ low =>
  37      eta x (fun _ => 0) low + k * psi x * (if low 0 = low 1 then 1 else 0)
  38    symmetric := by
  39      intro x up low
  40      unfold eta
  41      dsimp
  42      by_cases h : low 0 = low 1
  43      · have h_rev : low 1 = low 0 := h.symm
  44        rw [if_pos h, if_pos h, if_pos h_rev, if_pos h_rev]
  45        rw [h]
  46      · have h_rev : low 1 ≠ low 0 := fun heq => h heq.symm
  47        rw [if_neg h, if_neg h, if_neg h_rev, if_neg h_rev] }
  48
  49noncomputable def metric_to_matrix (g : MetricTensor) (x : Fin 4 → ℝ) : Matrix (Fin 4) (Fin 4) ℝ :=
  50  fun i j => g.g x (fun _ => 0) (fun k => if (k : ℕ) = 0 then i else j)
  51
  52/-- The metric matrix is symmetric because the metric tensor is symmetric. -/
  53lemma metric_to_matrix_symmetric (g : MetricTensor) (x : Fin 4 → ℝ) :
  54    (metric_to_matrix g x).transpose = metric_to_matrix g x := by
  55  ext i j
  56  unfold metric_to_matrix Matrix.transpose
  57  dsimp
  58  -- Apply the metric tensor symmetry: g x up low = g x up (swap low)
  59  have h := g.symmetric x (fun _ => 0) (fun k => if (k : ℕ) = 0 then j else i)
  60  -- The RHS evaluates to (fun k => if k.val = 0 then i else j) since 1 ≠ 0 and 0 = 0
  61  simp only [Fin.val_one, Fin.val_zero, one_ne_zero, ite_false, ite_true] at h
  62  exact h
  63
  64noncomputable def metric_det (g : MetricTensor) (x : Fin 4 → ℝ) : ℝ :=
  65  (metric_to_matrix g x).det