File size: 1,003 Bytes
cdec422
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import OAI.LinearAlgebra.MatrixMultiplication.JointExtraction.EntropyMax

namespace OAI

/-! Joint tensor extraction, compatibility and entropy estimates. -/

namespace MatrixMultiplication.JointCapacityAlgebra

open scoped BigOperators

theorem total_sub_max_degrees (A X Y Z : ℝ) :
    A - max (A - X) (max (A - Y) (A - Z)) = min X (min Y Z) := by
  simp only [max_def, min_def]
  split_ifs <;> linarith

theorem weighted_joint_capacity {H : Type*} [Fintype H]
    (mass entropy : H → ℝ) (capacity : H → Fin 3 → ℝ) :
    (∑ h, mass h * entropy h) -
        max (∑ h, mass h * (entropy h - capacity h 0))
          (max (∑ h, mass h * (entropy h - capacity h 1))
            (∑ h, mass h * (entropy h - capacity h 2))) =
      min (∑ h, mass h * capacity h 0)
        (min (∑ h, mass h * capacity h 1) (∑ h, mass h * capacity h 2)) := by
  simp_rw [mul_sub, Finset.sum_sub_distrib]
  exact total_sub_max_degrees _ _ _ _

end MatrixMultiplication.JointCapacityAlgebra

end OAI