Codon substitution models and dN/dS
AbbreviationCodon as a triple of nucleotides#✓fully proved
A codon: three nucleotides, each in Fin 4 (order A, C, G, T).
Used by 24
dN / dS = ω · Synonymous substitution rate per synonymous site (dS) · Positions at which two codons differ · Goldman–Yang codon exchangeability · Dependence of Goldman–Yang exchangeabilities on ω · Symmetry of Goldman–Yang exchangeabilities · Goldman–Yang codon rate matrix · Off-diagonal entries of the Goldman–Yang rate matrix · The Goldman–Yang chain is reversible · Goldman–Yang matrix is a rate matrix · Codons differing at exactly one position · Symmetry of single-position codon changes · Codon change consisting of transitions · Symmetry of transition codon changes · Stationary rate of nonsynonymous substitutions · Nonsynonymous rate is linear in ω · Positivity of the nonsynonymous rate · Number of nonsynonymous sites per codon · Stationary rate of synonymous substitutions · Synonymous rate does not depend on ω · Positivity of the synonymous rate · Number of synonymous sites per codon · Synonymous and nonsynonymous sites sum to threeDefinitionPositions at which two codons differ#✓fully proved
The positions at which two codons differ.
def diffPositions (c c' : Codon) : Finset (Fin 3) := univ.filter fun k => c k ≠ c' k
abbrev Codon := Fin 3 → Fin 4
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:79
Uses 1 · Used by 8
DefinitionCodons differing at exactly one position#✓fully proved
Two codons differ at exactly one position.
def IsSingleChange (c c' : Codon) : Prop := (diffPositions c c').card = 1
abbrev Codon := Fin 3 → Fin 4
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:79
def diffPositions (c c' : Codon) : Finset (Fin 3) := univ.filter fun k => c k ≠ c' k
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:82
Uses 2 · Used by 7
DefinitionCodon change consisting of transitions#✓fully proved
Every differing position is a transition (same parity: A ↔ G or C ↔ T).
def IsTransitionChange (c c' : Codon) : Prop :=
∀ k, c k ≠ c' k → (c k : ℕ) % 2 = (c' k : ℕ) % 2
abbrev Codon := Fin 3 → Fin 4
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:79
Uses 1 · Used by 7
TheoremSymmetry of single-position codon changes#✓fully proved
Differing at exactly one position is symmetric.
theorem isSingleChange_comm (c c' : Codon) : IsSingleChange c c' ↔ IsSingleChange c' c
abbrev Codon := Fin 3 → Fin 4
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:79
def IsSingleChange (c c' : Codon) : Prop := (diffPositions c c').card = 1
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:85
Uses 3 · Used by 1
TheoremSymmetry of transition codon changes#✓fully proved
Being a transition change is symmetric.
theorem isTransitionChange_comm (c c' : Codon) :
IsTransitionChange c c' ↔ IsTransitionChange c' c
abbrev Codon := Fin 3 → Fin 4
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:79
def IsTransitionChange (c c' : Codon) : Prop :=
∀ k, c k ≠ c' k → (c k : ℕ) % 2 = (c' k : ℕ) % 2
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:88
Uses 2 · Used by 1
DefinitionGoldman–Yang codon exchangeability#✓fully proved
The Goldman–Yang exchangeability between codons i and j: 0 unless they differ at
one position; otherwise κ for a transition (1 for a transversion), times ω if the amino
acid changes.
def gyExchange (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : Matrix ι ι ℝ :=
Matrix.of fun i j =>
if IsSingleChange (nuc i) (nuc j) then
(if IsTransitionChange (nuc i) (nuc j) then κ else 1) * (if aa i = aa j then 1 else ω)
else 0
abbrev Codon := Fin 3 → Fin 4
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:79
def IsSingleChange (c c' : Codon) : Prop := (diffPositions c c').card = 1
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:85
def IsTransitionChange (c c' : Codon) : Prop :=
∀ k, c k ≠ c' k → (c k : ℕ) % 2 = (c' k : ℕ) % 2
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:88
Uses 4 · Used by 10
TheoremSymmetry of Goldman–Yang exchangeabilities#✓fully proved
The Goldman–Yang exchangeabilities are symmetric.
theorem gyExchange_symm (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) (i j : ι) :
gyExchange nuc aa κ ω i j = gyExchange nuc aa κ ω j i
abbrev Codon := Fin 3 → Fin 4
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:79
def gyExchange (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : Matrix ι ι ℝ :=
Matrix.of fun i j =>
if IsSingleChange (nuc i) (nuc j) then
(if IsTransitionChange (nuc i) (nuc j) then κ else 1) * (if aa i = aa j then 1 else ω)
else 0
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:115
Uses 7 · Used by 1
TheoremDependence of Goldman–Yang exchangeabilities on ω#✓fully proved
The nonsynonymous exchangeabilities are linear in ω, the synonymous ones do not
involve it.
theorem gyExchange_eq (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) (i j : ι) :
gyExchange nuc aa κ ω i j =
(if aa i = aa j then 1 else ω) * gyExchange nuc aa κ 1 i j
abbrev Codon := Fin 3 → Fin 4
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:79
def gyExchange (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : Matrix ι ι ℝ :=
Matrix.of fun i j =>
if IsSingleChange (nuc i) (nuc j) then
(if IsTransitionChange (nuc i) (nuc j) then κ else 1) * (if aa i = aa j then 1 else ω)
else 0
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:115
Uses 5 · Used by 2
DefinitionGoldman–Yang codon rate matrix#✓fully proved
The Goldman–Yang rate matrix (Goldman & Yang 1994): the GTR matrix with codon
frequencies π and exchangeabilities gyExchange.
def gyRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : Matrix ι ι ℝ :=
gtrRate π (gyExchange nuc aa κ ω)
abbrev Codon := Fin 3 → Fin 4
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:79
noncomputable def gtrRate (π : ι → ℝ) (s : Matrix ι ι ℝ) : Matrix ι ι ℝ :=
Matrix.of fun i j => if i = j then -∑ k ∈ univ.erase i, s i k * π k else s i j * π j
MathlibExt/Biology/Phylogenetics/SubstitutionModels.lean:89
def gyExchange (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : Matrix ι ι ℝ :=
Matrix.of fun i j =>
if IsSingleChange (nuc i) (nuc j) then
(if IsTransitionChange (nuc i) (nuc j) then κ else 1) * (if aa i = aa j then 1 else ω)
else 0
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:115
Uses 3 · Used by 9
DefinitionStationary rate of synonymous substitutions#✓fully proved
The stationary rate of synonymous substitutions per codon,
ρ_S = ∑_{i ≠ j, aa i = aa j} π_i Q_ij. This is the stationary rate when
∑ i, π i = 1; for unnormalized weights it is scaled by (∑ i, π i) ^ 2.
def synRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
∑ i, ∑ j ∈ univ.filter fun j => j ≠ i ∧ aa j = aa i, π i * gyRate π nuc aa κ ω i j
abbrev Codon := Fin 3 → Fin 4
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:79
def gyRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : Matrix ι ι ℝ :=
gtrRate π (gyExchange nuc aa κ ω)
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:139
Uses 2 · Used by 7
DefinitionStationary rate of nonsynonymous substitutions#✓fully proved
The stationary rate of nonsynonymous substitutions per codon,
ρ_N = ∑_{aa i ≠ aa j} π_i Q_ij. This is the stationary rate when
∑ i, π i = 1; for unnormalized weights it is scaled by (∑ i, π i) ^ 2.
def nonsynRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
∑ i, ∑ j ∈ univ.filter fun j => aa j ≠ aa i, π i * gyRate π nuc aa κ ω i j
abbrev Codon := Fin 3 → Fin 4
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:79
def gyRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : Matrix ι ι ℝ :=
gtrRate π (gyExchange nuc aa κ ω)
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:139
Uses 2 · Used by 7
DefinitionNumber of synonymous sites per codon#✓fully proved
The number of synonymous sites per codon, counted under ω = 1:
S = 3 ρ_S(1) / (ρ_S(1) + ρ_N(1)).
def synSites (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ : ℝ) : ℝ :=
3 * synRate π nuc aa κ 1 / (synRate π nuc aa κ 1 + nonsynRate π nuc aa κ 1)
abbrev Codon := Fin 3 → Fin 4
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:79
def synRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
∑ i, ∑ j ∈ univ.filter fun j => j ≠ i ∧ aa j = aa i, π i * gyRate π nuc aa κ ω i j
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:145
def nonsynRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
∑ i, ∑ j ∈ univ.filter fun j => aa j ≠ aa i, π i * gyRate π nuc aa κ ω i j
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:151
DefinitionNumber of nonsynonymous sites per codon#✓fully proved
The number of nonsynonymous sites per codon, counted under ω = 1:
N = 3 ρ_N(1) / (ρ_S(1) + ρ_N(1)).
def nonsynSites (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ : ℝ) : ℝ :=
3 * nonsynRate π nuc aa κ 1 / (synRate π nuc aa κ 1 + nonsynRate π nuc aa κ 1)
abbrev Codon := Fin 3 → Fin 4
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:79
def nonsynRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
∑ i, ∑ j ∈ univ.filter fun j => aa j ≠ aa i, π i * gyRate π nuc aa κ ω i j
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:151
def synRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
∑ i, ∑ j ∈ univ.filter fun j => j ≠ i ∧ aa j = aa i, π i * gyRate π nuc aa κ ω i j
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:145
DefinitionSynonymous substitution rate per synonymous site (dS)#✓fully proved
The synonymous rate per synonymous site, dS = ρ_S(ω) / S.
def dS (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
synRate π nuc aa κ ω / synSites π nuc aa κ
abbrev Codon := Fin 3 → Fin 4
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:79
def synRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
∑ i, ∑ j ∈ univ.filter fun j => j ≠ i ∧ aa j = aa i, π i * gyRate π nuc aa κ ω i j
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:145
def synSites (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ : ℝ) : ℝ :=
3 * synRate π nuc aa κ 1 / (synRate π nuc aa κ 1 + nonsynRate π nuc aa κ 1)
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:156
Uses 3 · Used by 1
DefinitionNonsynonymous substitution rate per nonsynonymous site (dN)#✓fully proved
The nonsynonymous rate per nonsynonymous site, dN = ρ_N(ω) / N.
def dN (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
nonsynRate π nuc aa κ ω / nonsynSites π nuc aa κ
abbrev Codon := Fin 3 → Fin 4
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:79
def nonsynRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
∑ i, ∑ j ∈ univ.filter fun j => aa j ≠ aa i, π i * gyRate π nuc aa κ ω i j
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:151
def nonsynSites (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ : ℝ) : ℝ :=
3 * nonsynRate π nuc aa κ 1 / (synRate π nuc aa κ 1 + nonsynRate π nuc aa κ 1)
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:161
Uses 3 · Used by 1
TheoremOff-diagonal entries of the Goldman–Yang rate matrix#✓fully proved
Off the diagonal the Goldman–Yang rate is gyExchange i j * π j.
theorem gyRate_of_ne {i j : ι} (h : i ≠ j) :
gyRate π nuc aa κ ω i j = gyExchange nuc aa κ ω i j * π j
def gyRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : Matrix ι ι ℝ :=
gtrRate π (gyExchange nuc aa κ ω)
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:139
def gyExchange (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : Matrix ι ι ℝ :=
Matrix.of fun i j =>
if IsSingleChange (nuc i) (nuc j) then
(if IsTransitionChange (nuc i) (nuc j) then κ else 1) * (if aa i = aa j then 1 else ω)
else 0
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:115
TheoremGoldman–Yang matrix is a rate matrix#✓fully proved
With nonnegative frequencies, κ ≥ 0 and ω ≥ 0, the Goldman–Yang matrix is a rate
matrix.
theorem isRateMatrix_gyRate {π : ι → ℝ} (hπ : ∀ i, 0 ≤ π i) {κ ω : ℝ} (hκ : 0 ≤ κ)
(hω : 0 ≤ ω) : IsRateMatrix (gyRate π nuc aa κ ω)
structure IsRateMatrix (Q : Matrix ι ι ℝ) : Prop where
/-- The jump rates `Q i j`, `i ≠ j`, are nonnegative. -/
nonneg_of_ne : ∀ ⦃i j : ι⦄, i ≠ j → 0 ≤ Q i j
/-- Each row sums to `0`. -/
sum_row : ∀ i, ∑ j, Q i j = 0
MathlibExt/Probability/Process/ContinuousTimeMarkovChain/RateMatrix.lean:57
def gyRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : Matrix ι ι ℝ :=
gtrRate π (gyExchange nuc aa κ ω)
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:139
TheoremThe Goldman–Yang chain is reversible#✓fully proved
It is in detailed balance with its codon frequencies.
theorem isDetailedBalance_gyRate : IsDetailedBalance π (gyRate π nuc aa κ ω)
def IsDetailedBalance (π : ι → ℝ) (Q : Matrix ι ι ℝ) : Prop :=
∀ i j, π i * Q i j = π j * Q j i
MathlibExt/Probability/Process/ContinuousTimeMarkovChain/Stationary.lean:64
def gyRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : Matrix ι ι ℝ :=
gtrRate π (gyExchange nuc aa κ ω)
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:139
Uses 6
TheoremSynonymous rate does not depend on ω#✓fully proved
The synonymous rate does not depend on ω: ρ_S(ω) = ρ_S(1).
theorem synRate_eq : synRate π nuc aa κ ω = synRate π nuc aa κ 1
def synRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
∑ i, ∑ j ∈ univ.filter fun j => j ≠ i ∧ aa j = aa i, π i * gyRate π nuc aa κ ω i j
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:145
Uses 6 · Used by 1
TheoremNonsynonymous rate is linear in ω#✓fully proved
The nonsynonymous rate is linear in ω: ρ_N(ω) = ω ρ_N(1).
theorem nonsynRate_eq : nonsynRate π nuc aa κ ω = ω * nonsynRate π nuc aa κ 1
def nonsynRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
∑ i, ∑ j ∈ univ.filter fun j => aa j ≠ aa i, π i * gyRate π nuc aa κ ω i j
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:151
Uses 6 · Used by 1
TheoremSynonymous and nonsynonymous sites sum to three#✓fully proved
There are three sites per codon: S + N = 3 when ρ_S(1) + ρ_N(1) ≠ 0.
theorem synSites_add_nonsynSites (h : synRate π nuc aa κ 1 + nonsynRate π nuc aa κ 1 ≠ 0) :
synSites π nuc aa κ + nonsynSites π nuc aa κ = 3
def synRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
∑ i, ∑ j ∈ univ.filter fun j => j ≠ i ∧ aa j = aa i, π i * gyRate π nuc aa κ ω i j
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:145
def nonsynRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
∑ i, ∑ j ∈ univ.filter fun j => aa j ≠ aa i, π i * gyRate π nuc aa κ ω i j
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:151
def synSites (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ : ℝ) : ℝ :=
3 * synRate π nuc aa κ 1 / (synRate π nuc aa κ 1 + nonsynRate π nuc aa κ 1)
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:156
def nonsynSites (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ : ℝ) : ℝ :=
3 * nonsynRate π nuc aa κ 1 / (synRate π nuc aa κ 1 + nonsynRate π nuc aa κ 1)
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:161
TheoremdN / dS = ω#✓fully proved
dN / dS = ω in the Goldman–Yang model with sites counted under ω = 1 (derived;
see the module docstring for the site definition), provided ρ_S(1) > 0 and ρ_N(1) > 0.
theorem dN_div_dS (hS : 0 < synRate π nuc aa κ 1) (hN : 0 < nonsynRate π nuc aa κ 1) :
dN π nuc aa κ ω / dS π nuc aa κ ω = ω
def synRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
∑ i, ∑ j ∈ univ.filter fun j => j ≠ i ∧ aa j = aa i, π i * gyRate π nuc aa κ ω i j
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:145
def nonsynRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
∑ i, ∑ j ∈ univ.filter fun j => aa j ≠ aa i, π i * gyRate π nuc aa κ ω i j
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:151
def dN (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
nonsynRate π nuc aa κ ω / nonsynSites π nuc aa κ
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:169
def dS (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
synRate π nuc aa κ ω / synSites π nuc aa κ
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:165
TheoremPositivity of the synonymous rate#✓fully proved
ρ_S(1) > 0 if the frequencies are nonnegative, κ > 0, and some synonymous single
change joins two codons of positive frequency.
theorem synRate_pos_of_mem {π : ι → ℝ} (hπ : ∀ i, 0 ≤ π i) {κ : ℝ} (hκ : 0 < κ) {i j : ι}
(hij : i ≠ j) (haa : aa i = aa j) (hs : IsSingleChange (nuc i) (nuc j)) (hi : 0 < π i)
(hj : 0 < π j) : 0 < synRate π nuc aa κ 1
def IsSingleChange (c c' : Codon) : Prop := (diffPositions c c').card = 1
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:85
def synRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
∑ i, ∑ j ∈ univ.filter fun j => j ≠ i ∧ aa j = aa i, π i * gyRate π nuc aa κ ω i j
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:145
TheoremPositivity of the nonsynonymous rate#✓fully proved
ρ_N(1) > 0 if the frequencies are nonnegative, κ > 0, and some nonsynonymous single
change joins two codons of positive frequency.
theorem nonsynRate_pos_of_mem {π : ι → ℝ} (hπ : ∀ i, 0 ≤ π i) {κ : ℝ} (hκ : 0 < κ) {i j : ι}
(haa : aa i ≠ aa j) (hs : IsSingleChange (nuc i) (nuc j)) (hi : 0 < π i)
(hj : 0 < π j) : 0 < nonsynRate π nuc aa κ 1
def IsSingleChange (c c' : Codon) : Prop := (diffPositions c c').card = 1
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:85
def nonsynRate (π : ι → ℝ) (nuc : ι → Codon) (aa : ι → α) (κ ω : ℝ) : ℝ :=
∑ i, ∑ j ∈ univ.filter fun j => aa j ≠ aa i, π i * gyRate π nuc aa κ ω i j
MathlibExt/Biology/Phylogenetics/CodonOmega.lean:151
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.