File size: 1,003 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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