theory_file stringclasses 56
values | lemma_name stringlengths 18 302 | lemma_command stringlengths 26 3.61k | lemma_object stringlengths 19 2.29k | template stringlengths 10 1.16k | symbols listlengths 0 22 | types listlengths 0 22 | defs listlengths 0 19 |
|---|---|---|---|---|---|---|---|
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.classical_logic.MCSs_are_possibilities | lemma (in classical_logic) MCSs_are_possibilities:
assumes "MCS s"
shows "possibility (\<lambda> x. x \<in> s)" | \<lbrakk>class.classical_logic deduction implication falsum; classical_logic.maximally_consistent_set deduction implication falsum s\<rbrakk> \<Longrightarrow> classical_logic.possibility deduction implication falsum (\<lambda>x. x \<in> s) | \<lbrakk>H1 x_1 x_2 x_3; H2 x_1 x_2 x_3 x_4\<rbrakk> \<Longrightarrow> H3 x_1 x_2 x_3 (\<lambda>y_0. y_0 \<in> x_4) | [
"Arbitrage_Probability_Correspondence.classical_logic.possibility",
"Classical_Logic.classical_logic.maximally_consistent_set",
"Classical_Logic.class.classical_logic"
] | [
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarrow> 'a)\n \\<Rightarrow> 'a \\<Rightarrow> ('a \\<Rightarrow> bool)\n \\<Rightarrow> bool",
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarrow> 'a)\n \\<Rightarrow> 'a \\<Rightarro... | [
"class classical_logic = implication_logic +\n fixes falsum :: \"'a\" (\\<open>\\<bottom>\\<close>)\n assumes double_negation: \"\\<turnstile> (((\\<phi> \\<rightarrow> \\<bottom>) \\<rightarrow> \\<bottom>) \\<rightarrow> \\<phi>)\""
] |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.classical_logic.ask_revenue_equivalence | lemma (in classical_logic) ask_revenue_equivalence:
assumes "possibility p"
shows " \<pi> p \<lparr> asks = asks', bids = bids' \<rparr>
= - settle p (bids'\<^sup>\<sim> @ asks')
+ total_price asks'
+ length bids'
- total_price bids'" | \<lbrakk>class.classical_logic deduction implication falsum; classical_logic.possibility deduction implication falsum p\<rbrakk> \<Longrightarrow> \<pi> p \<lparr>asks = asks', bids = bids'\<rparr> = - settle p (classical_logic.negate_bets implication falsum bids' @ asks') + total_price asks' + real (length bids') - to... | \<lbrakk>H1 x_1 x_2 x_3; H2 x_1 x_2 x_3 x_4\<rbrakk> \<Longrightarrow> H3 x_4 (H4 x_5 x_6 H5) = H6 (H7 (H7 (H8 (H9 x_4 (H10 (H11 x_2 x_3 x_6) x_5))) (H12 x_5)) (H13 (H14 x_6))) (H12 x_6) | [
"List.length",
"Real.real",
"Arbitrage_Probability_Correspondence.total_price",
"Arbitrage_Probability_Correspondence.classical_logic.negate_bets",
"List.append",
"Arbitrage_Probability_Correspondence.settle",
"Groups.uminus_class.uminus",
"Groups.plus_class.plus",
"Groups.minus_class.minus",
"Pro... | [
"'a list \\<Rightarrow> nat",
"nat \\<Rightarrow> real",
"'a bet_offer list \\<Rightarrow> real",
"('a \\<Rightarrow> 'a \\<Rightarrow> 'a)\n\\<Rightarrow> 'a \\<Rightarrow> ('a, 'b) bet_offer_scheme list\n \\<Rightarrow> ('a, 'b) bet_offer_scheme list",
"'a list \\<Rightarrow>... | [
"abbreviation length :: \"'a list \\<Rightarrow> nat\" where\n\"length \\<equiv> size\"",
"abbreviation real :: \"nat \\<Rightarrow> real\"\n where \"real \\<equiv> of_nat\"",
"definition total_price :: \"('p bet_offer) list \\<Rightarrow> real\" where\n \"total_price offers \\<equiv> \\<Sum> i \\<leftarrow> ... |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.classical_logic.bid_revenue_equivalence | lemma (in classical_logic) bid_revenue_equivalence:
assumes "possibility p"
shows " \<pi> p \<lparr> asks = asks', bids = bids' \<rparr>
= settle p (asks'\<^sup>\<sim> @ bids')
+ total_price asks'
- total_price bids'
- length asks'" | \<lbrakk>class.classical_logic deduction implication falsum; classical_logic.possibility deduction implication falsum p\<rbrakk> \<Longrightarrow> \<pi> p \<lparr>asks = asks', bids = bids'\<rparr> = settle p (classical_logic.negate_bets implication falsum asks' @ bids') + total_price asks' - total_price bids' - real (... | \<lbrakk>H1 x_1 x_2 x_3; H2 x_1 x_2 x_3 x_4\<rbrakk> \<Longrightarrow> H3 x_4 (H4 x_5 x_6 H5) = H6 (H6 (H7 (H8 x_4 (H9 (H10 x_2 x_3 x_5) x_6)) (H11 x_5)) (H11 x_6)) (H12 (H13 x_5)) | [
"List.length",
"Real.real",
"Arbitrage_Probability_Correspondence.total_price",
"Arbitrage_Probability_Correspondence.classical_logic.negate_bets",
"List.append",
"Arbitrage_Probability_Correspondence.settle",
"Groups.plus_class.plus",
"Groups.minus_class.minus",
"Product_Type.Unity",
"Arbitrage_P... | [
"'a list \\<Rightarrow> nat",
"nat \\<Rightarrow> real",
"'a bet_offer list \\<Rightarrow> real",
"('a \\<Rightarrow> 'a \\<Rightarrow> 'a)\n\\<Rightarrow> 'a \\<Rightarrow> ('a, 'b) bet_offer_scheme list\n \\<Rightarrow> ('a, 'b) bet_offer_scheme list",
"'a list \\<Rightarrow>... | [
"abbreviation length :: \"'a list \\<Rightarrow> nat\" where\n\"length \\<equiv> size\"",
"abbreviation real :: \"nat \\<Rightarrow> real\"\n where \"real \\<equiv> of_nat\"",
"definition total_price :: \"('p bet_offer) list \\<Rightarrow> real\" where\n \"total_price offers \\<equiv> \\<Sum> i \\<leftarrow> ... |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.classical_logic.possibilities_are_MCS | lemma (in classical_logic) possibilities_are_MCS:
assumes "possibility p"
shows "MCS {x. p x}" | \<lbrakk>class.classical_logic deduction implication falsum; classical_logic.possibility deduction implication falsum p\<rbrakk> \<Longrightarrow> classical_logic.maximally_consistent_set deduction implication falsum {x. p x} | \<lbrakk>H1 x_1 x_2 x_3; H2 x_1 x_2 x_3 x_4\<rbrakk> \<Longrightarrow> H3 x_1 x_2 x_3 (H4 x_4) | [
"Set.Collect",
"Classical_Logic.classical_logic.maximally_consistent_set",
"Arbitrage_Probability_Correspondence.classical_logic.possibility",
"Classical_Logic.class.classical_logic"
] | [
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarrow> 'a)\n \\<Rightarrow> 'a \\<Rightarrow> 'a set \\<Rightarrow> bool",
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarrow> 'a)\n \\<R... | [
"class classical_logic = implication_logic +\n fixes falsum :: \"'a\" (\\<open>\\<bottom>\\<close>)\n assumes double_negation: \"\\<turnstile> (((\\<phi> \\<rightarrow> \\<bottom>) \\<rightarrow> \\<bottom>) \\<rightarrow> \\<phi>)\""
] |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.classical_logic.possibilities_logical_closure | lemma (in classical_logic) possibilities_logical_closure:
assumes "possibility p"
and "{x. p x} \<tturnstile> \<phi>"
shows "p \<phi>" | \<lbrakk>class.classical_logic deduction implication falsum; classical_logic.possibility deduction implication falsum p; implication_logic.set_deduction deduction implication {x. p x} \<phi>\<rbrakk> \<Longrightarrow> p \<phi> | \<lbrakk>H1 x_1 x_2 x_3; H2 x_1 x_2 x_3 x_4; H3 x_1 x_2 (H4 x_4) x_5\<rbrakk> \<Longrightarrow> x_4 x_5 | [
"Set.Collect",
"Implication_Logic.implication_logic.set_deduction",
"Arbitrage_Probability_Correspondence.classical_logic.possibility",
"Classical_Logic.class.classical_logic"
] | [
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarrow> 'a)\n \\<Rightarrow> 'a set \\<Rightarrow> 'a \\<Rightarrow> bool",
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarrow> 'a)\n \\<R... | [
"class implication_logic =\n fixes deduction :: \"'a \\<Rightarrow> bool\" (\\<open>\\<turnstile> _\\<close> [60] 55)\n fixes implication :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixr \\<open>\\<rightarrow>\\<close> 70)\n assumes axiom_k: \"\\<turnstile> \\<phi> \\<rightarrow> \\<psi> \\<rightarrow> \\<p... |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.classical_logic.possibility_negation | lemma (in classical_logic) possibility_negation:
assumes "possibility p"
shows "p (\<phi> \<rightarrow> \<bottom>) = (\<not> p \<phi>)" | \<lbrakk>class.classical_logic deduction implication falsum; classical_logic.possibility deduction implication falsum p\<rbrakk> \<Longrightarrow> p (implication \<phi> falsum) = (\<not> p \<phi>) | \<lbrakk>H1 x_1 x_2 x_3; H2 x_1 x_2 x_3 x_4\<rbrakk> \<Longrightarrow> x_4 (x_2 x_5 x_3) = (\<not> x_4 x_5) | [
"Arbitrage_Probability_Correspondence.classical_logic.possibility",
"Classical_Logic.class.classical_logic"
] | [
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarrow> 'a)\n \\<Rightarrow> 'a \\<Rightarrow> ('a \\<Rightarrow> bool)\n \\<Rightarrow> bool",
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarrow> 'a)\n \\<Rightarrow> 'a \\<Rightarro... | [] |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.consistent_classical_logic.arbitrageur_correspondence | theorem (in consistent_classical_logic) arbitrageur_correspondence:
" (0 < \<pi>\<^sub>m\<^sub>i\<^sub>n \<lparr> asks = asks', bids = bids' \<rparr>)
= (\<forall> \<P> \<in> probabilities.
(\<Sum>b\<leftarrow>asks'. \<P> (bet b)) + total_price bids'
< (\<Sum>s\<leftarrow>bids'. \<P> (bet s)) + to... | class.consistent_classical_logic deduction implication falsum \<Longrightarrow> (0 < consistent_classical_logic.minimum_payoff deduction implication falsum \<lparr>asks = asks', bids = bids'\<rparr>) = (\<forall>\<P> \<in>classical_logic.probabilities deduction implication falsum. (\<Sum>b\<leftarrow>asks'. \<P> (bet b... | H1 x_1 x_2 x_3 \<Longrightarrow> (H2 < H3 x_1 x_2 x_3 (H4 x_4 x_5 H5)) = (\<forall>y_0\<in>H6 x_1 x_2 x_3. H7 (H8 (H9 (\<lambda>y_1. y_0 (H10 y_1)) x_4)) (H11 x_5) < H7 (H8 (H9 (\<lambda>y_2. y_0 (H10 y_2)) x_5)) (H11 x_4)) | [
"Arbitrage_Probability_Correspondence.total_price",
"Arbitrage_Probability_Correspondence.bet_offer.bet",
"List.list.map",
"Groups_List.monoid_add_class.sum_list",
"Groups.plus_class.plus",
"Probability_Logic.classical_logic.probabilities",
"Product_Type.Unity",
"Arbitrage_Probability_Correspondence.s... | [
"'a bet_offer list \\<Rightarrow> real",
"('a, 'b) bet_offer_scheme \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a list \\<Rightarrow> 'b list",
"'a list \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarr... | [
"definition total_price :: \"('p bet_offer) list \\<Rightarrow> real\" where\n \"total_price offers \\<equiv> \\<Sum> i \\<leftarrow> offers. price i\"",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>+\\<close> 65)",
"definition Unity :: unit (\\<open>'(')\\<close>... |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.consistent_classical_logic.arbitrageur_maxsat | theorem (in consistent_classical_logic) arbitrageur_maxsat:
" ((k :: real) \<le> \<pi>\<^sub>m\<^sub>i\<^sub>n \<lparr> asks = asks', bids = bids' \<rparr>)
= ( MaxSAT [bet b . b \<leftarrow> bids'\<^sup>\<sim> @ asks']
\<le> total_price asks' + length bids' - total_price bids' - k )"
(is "(k \<le> \<pi>... | class.consistent_classical_logic deduction implication falsum \<Longrightarrow> (k \<le> consistent_classical_logic.minimum_payoff deduction implication falsum \<lparr>asks = asks', bids = bids'\<rparr>) = (real (implication_logic.relative_MaxSAT deduction implication (map bet (classical_logic.negate_bets implication f... | H1 x_1 x_2 x_3 \<Longrightarrow> (x_4 \<le> H2 x_1 x_2 x_3 (H3 x_5 x_6 H4)) = (H5 (H6 x_1 x_2 (H7 H8 (H9 (H10 x_2 x_3 x_6) x_5)) x_3) \<le> H11 (H11 (H12 (H13 x_5) (H5 (H14 x_6))) (H13 x_6)) x_4) | [
"List.length",
"Arbitrage_Probability_Correspondence.total_price",
"Groups.plus_class.plus",
"Groups.minus_class.minus",
"Arbitrage_Probability_Correspondence.classical_logic.negate_bets",
"List.append",
"Arbitrage_Probability_Correspondence.bet_offer.bet",
"List.list.map",
"Probability_Inequality_C... | [
"'a list \\<Rightarrow> nat",
"'a bet_offer list \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'a \\<Rightarrow> 'a)\n\\<Rightarrow> 'a \\<Rightarrow> ('a, 'b) bet_offer_scheme list\n \\<Rightarrow>... | [
"abbreviation length :: \"'a list \\<Rightarrow> nat\" where\n\"length \\<equiv> size\"",
"definition total_price :: \"('p bet_offer) list \\<Rightarrow> real\" where\n \"total_price offers \\<equiv> \\<Sum> i \\<leftarrow> offers. price i\"",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow... |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.consistent_classical_logic.arbitrageur_nonstrict_correspondence | lemma (in consistent_classical_logic) arbitrageur_nonstrict_correspondence:
" (k \<le> \<pi>\<^sub>m\<^sub>i\<^sub>n \<lparr> asks = asks', bids = bids' \<rparr>)
= (\<forall> \<P> \<in> probabilities.
(\<Sum>b\<leftarrow>asks'. \<P> (bet b)) + total_price bids' + k
\<le> (\<Sum>s\<leftarrow>bids'... | class.consistent_classical_logic deduction implication falsum \<Longrightarrow> (k \<le> consistent_classical_logic.minimum_payoff deduction implication falsum \<lparr>asks = asks', bids = bids'\<rparr>) = (\<forall>\<P> \<in>classical_logic.probabilities deduction implication falsum. (\<Sum>b\<leftarrow>asks'. \<P> (b... | H1 x_1 x_2 x_3 \<Longrightarrow> (x_4 \<le> H2 x_1 x_2 x_3 (H3 x_5 x_6 H4)) = (\<forall>y_0\<in>H5 x_1 x_2 x_3. H6 (H6 (H7 (H8 (\<lambda>y_1. y_0 (H9 y_1)) x_5)) (H10 x_6)) x_4 \<le> H6 (H7 (H8 (\<lambda>y_2. y_0 (H9 y_2)) x_6)) (H10 x_5)) | [
"Arbitrage_Probability_Correspondence.total_price",
"Arbitrage_Probability_Correspondence.bet_offer.bet",
"List.list.map",
"Groups_List.monoid_add_class.sum_list",
"Groups.plus_class.plus",
"Probability_Logic.classical_logic.probabilities",
"Product_Type.Unity",
"Arbitrage_Probability_Correspondence.s... | [
"'a bet_offer list \\<Rightarrow> real",
"('a, 'b) bet_offer_scheme \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a list \\<Rightarrow> 'b list",
"'a list \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarr... | [
"definition total_price :: \"('p bet_offer) list \\<Rightarrow> real\" where\n \"total_price offers \\<equiv> \\<Sum> i \\<leftarrow> offers. price i\"",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>+\\<close> 65)",
"definition Unity :: unit (\\<open>'(')\\<close>... |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.consistent_classical_logic.arbitrageur_strict_correspondence | lemma (in consistent_classical_logic) arbitrageur_strict_correspondence:
" (k < \<pi>\<^sub>m\<^sub>i\<^sub>n \<lparr> asks = asks', bids = bids' \<rparr>)
= (\<forall> \<P> \<in> probabilities.
(\<Sum>b\<leftarrow>asks'. \<P> (bet b)) + total_price bids' + k
< (\<Sum>s\<leftarrow>bids'. \<P> (bet... | class.consistent_classical_logic deduction implication falsum \<Longrightarrow> (k < consistent_classical_logic.minimum_payoff deduction implication falsum \<lparr>asks = asks', bids = bids'\<rparr>) = (\<forall>\<P> \<in>classical_logic.probabilities deduction implication falsum. (\<Sum>b\<leftarrow>asks'. \<P> (bet b... | H1 x_1 x_2 x_3 \<Longrightarrow> (x_4 < H2 x_1 x_2 x_3 (H3 x_5 x_6 H4)) = (\<forall>y_0\<in>H5 x_1 x_2 x_3. H6 (H6 (H7 (H8 (\<lambda>y_1. y_0 (H9 y_1)) x_5)) (H10 x_6)) x_4 < H6 (H7 (H8 (\<lambda>y_2. y_0 (H9 y_2)) x_6)) (H10 x_5)) | [
"Arbitrage_Probability_Correspondence.total_price",
"Arbitrage_Probability_Correspondence.bet_offer.bet",
"List.list.map",
"Groups_List.monoid_add_class.sum_list",
"Groups.plus_class.plus",
"Probability_Logic.classical_logic.probabilities",
"Product_Type.Unity",
"Arbitrage_Probability_Correspondence.s... | [
"'a bet_offer list \\<Rightarrow> real",
"('a, 'b) bet_offer_scheme \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a list \\<Rightarrow> 'b list",
"'a list \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarr... | [
"definition total_price :: \"('p bet_offer) list \\<Rightarrow> real\" where\n \"total_price offers \\<equiv> \\<Sum> i \\<leftarrow> offers. price i\"",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>+\\<close> 65)",
"definition Unity :: unit (\\<open>'(')\\<close>... |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.consistent_classical_logic.coherence_correspondence | theorem (in consistent_classical_logic) coherence_correspondence:
" (\<pi>\<^sub>m\<^sub>a\<^sub>x \<lparr> asks = asks', bids = bids' \<rparr> < 0)
= (\<forall> \<P> \<in> probabilities.
(\<Sum>b\<leftarrow>bids'. \<P> (bet b)) + total_price asks'
< (\<Sum>s\<leftarrow>asks'. \<P> (bet s)) + tota... | class.consistent_classical_logic deduction implication falsum \<Longrightarrow> (consistent_classical_logic.maximum_payoff deduction implication falsum \<lparr>asks = asks', bids = bids'\<rparr> < 0) = (\<forall>\<P> \<in>classical_logic.probabilities deduction implication falsum. (\<Sum>b\<leftarrow>bids'. \<P> (bet b... | H1 x_1 x_2 x_3 \<Longrightarrow> (H2 x_1 x_2 x_3 (H3 x_4 x_5 H4) < H5) = (\<forall>y_0\<in>H6 x_1 x_2 x_3. H7 (H8 (H9 (\<lambda>y_1. y_0 (H10 y_1)) x_5)) (H11 x_4) < H7 (H8 (H9 (\<lambda>y_2. y_0 (H10 y_2)) x_4)) (H11 x_5)) | [
"Arbitrage_Probability_Correspondence.total_price",
"Arbitrage_Probability_Correspondence.bet_offer.bet",
"List.list.map",
"Groups_List.monoid_add_class.sum_list",
"Groups.plus_class.plus",
"Probability_Logic.classical_logic.probabilities",
"Groups.zero_class.zero",
"Product_Type.Unity",
"Arbitrage_... | [
"'a bet_offer list \\<Rightarrow> real",
"('a, 'b) bet_offer_scheme \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a list \\<Rightarrow> 'b list",
"'a list \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarr... | [
"definition total_price :: \"('p bet_offer) list \\<Rightarrow> real\" where\n \"total_price offers \\<equiv> \\<Sum> i \\<leftarrow> offers. price i\"",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>+\\<close> 65)",
"class zero =\n fixes zero :: 'a (\\<open>0\\<c... |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.consistent_classical_logic.coherence_maxsat | theorem (in consistent_classical_logic) coherence_maxsat:
" (\<pi>\<^sub>m\<^sub>a\<^sub>x \<lparr> asks = asks', bids = bids' \<rparr> \<le> (k :: real))
= (MaxSAT [bet b . b \<leftarrow> asks'\<^sup>\<sim> @ bids']
\<le> k - total_price asks' + total_price bids' + length asks')"
(is "(\<pi>\<^sub>m\<^... | class.consistent_classical_logic deduction implication falsum \<Longrightarrow> (consistent_classical_logic.maximum_payoff deduction implication falsum \<lparr>asks = asks', bids = bids'\<rparr> \<le> k) = (real (implication_logic.relative_MaxSAT deduction implication (map bet (classical_logic.negate_bets implication f... | H1 x_1 x_2 x_3 \<Longrightarrow> (H2 x_1 x_2 x_3 (H3 x_4 x_5 H4) \<le> x_6) = (H5 (H6 x_1 x_2 (H7 H8 (H9 (H10 x_2 x_3 x_4) x_5)) x_3) \<le> H11 (H11 (H12 x_6 (H13 x_4)) (H13 x_5)) (H5 (H14 x_4))) | [
"List.length",
"Arbitrage_Probability_Correspondence.total_price",
"Groups.minus_class.minus",
"Groups.plus_class.plus",
"Arbitrage_Probability_Correspondence.classical_logic.negate_bets",
"List.append",
"Arbitrage_Probability_Correspondence.bet_offer.bet",
"List.list.map",
"Probability_Inequality_C... | [
"'a list \\<Rightarrow> nat",
"'a bet_offer list \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'a \\<Rightarrow> 'a)\n\\<Rightarrow> 'a \\<Rightarrow> ('a, 'b) bet_offer_scheme list\n \\<Rightarrow>... | [
"abbreviation length :: \"'a list \\<Rightarrow> nat\" where\n\"length \\<equiv> size\"",
"definition total_price :: \"('p bet_offer) list \\<Rightarrow> real\" where\n \"total_price offers \\<equiv> \\<Sum> i \\<leftarrow> offers. price i\"",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarr... |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.consistent_classical_logic.coherence_nonstrict_correspondence | lemma (in consistent_classical_logic) coherence_nonstrict_correspondence:
" (\<pi>\<^sub>m\<^sub>a\<^sub>x \<lparr> asks = asks', bids = bids' \<rparr> \<le> k)
= (\<forall> \<P> \<in> probabilities.
(\<Sum>b\<leftarrow>bids'. \<P> (bet b)) + total_price asks'
\<le> (\<Sum>s\<leftarrow>asks'. \<P>... | class.consistent_classical_logic deduction implication falsum \<Longrightarrow> (consistent_classical_logic.maximum_payoff deduction implication falsum \<lparr>asks = asks', bids = bids'\<rparr> \<le> k) = (\<forall>\<P> \<in>classical_logic.probabilities deduction implication falsum. (\<Sum>b\<leftarrow>bids'. \<P> (b... | H1 x_1 x_2 x_3 \<Longrightarrow> (H2 x_1 x_2 x_3 (H3 x_4 x_5 H4) \<le> x_6) = (\<forall>y_0\<in>H5 x_1 x_2 x_3. H6 (H7 (H8 (\<lambda>y_1. y_0 (H9 y_1)) x_5)) (H10 x_4) \<le> H6 (H6 (H7 (H8 (\<lambda>y_2. y_0 (H9 y_2)) x_4)) (H10 x_5)) x_6) | [
"Arbitrage_Probability_Correspondence.total_price",
"Arbitrage_Probability_Correspondence.bet_offer.bet",
"List.list.map",
"Groups_List.monoid_add_class.sum_list",
"Groups.plus_class.plus",
"Probability_Logic.classical_logic.probabilities",
"Product_Type.Unity",
"Arbitrage_Probability_Correspondence.s... | [
"'a bet_offer list \\<Rightarrow> real",
"('a, 'b) bet_offer_scheme \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a list \\<Rightarrow> 'b list",
"'a list \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarr... | [
"definition total_price :: \"('p bet_offer) list \\<Rightarrow> real\" where\n \"total_price offers \\<equiv> \\<Sum> i \\<leftarrow> offers. price i\"",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>+\\<close> 65)",
"definition Unity :: unit (\\<open>'(')\\<close>... |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.consistent_classical_logic.coherence_strict_correspondence | lemma (in consistent_classical_logic) coherence_strict_correspondence:
" (\<pi>\<^sub>m\<^sub>a\<^sub>x \<lparr> asks = asks', bids = bids' \<rparr> < k)
= (\<forall> \<P> \<in> probabilities.
(\<Sum>b\<leftarrow>bids'. \<P> (bet b)) + total_price asks'
< (\<Sum>s\<leftarrow>asks'. \<P> (bet s)) +... | class.consistent_classical_logic deduction implication falsum \<Longrightarrow> (consistent_classical_logic.maximum_payoff deduction implication falsum \<lparr>asks = asks', bids = bids'\<rparr> < k) = (\<forall>\<P> \<in>classical_logic.probabilities deduction implication falsum. (\<Sum>b\<leftarrow>bids'. \<P> (bet b... | H1 x_1 x_2 x_3 \<Longrightarrow> (H2 x_1 x_2 x_3 (H3 x_4 x_5 H4) < x_6) = (\<forall>y_0\<in>H5 x_1 x_2 x_3. H6 (H7 (H8 (\<lambda>y_1. y_0 (H9 y_1)) x_5)) (H10 x_4) < H6 (H6 (H7 (H8 (\<lambda>y_2. y_0 (H9 y_2)) x_4)) (H10 x_5)) x_6) | [
"Arbitrage_Probability_Correspondence.total_price",
"Arbitrage_Probability_Correspondence.bet_offer.bet",
"List.list.map",
"Groups_List.monoid_add_class.sum_list",
"Groups.plus_class.plus",
"Probability_Logic.classical_logic.probabilities",
"Product_Type.Unity",
"Arbitrage_Probability_Correspondence.s... | [
"'a bet_offer list \\<Rightarrow> real",
"('a, 'b) bet_offer_scheme \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a list \\<Rightarrow> 'b list",
"'a list \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarr... | [
"definition total_price :: \"('p bet_offer) list \\<Rightarrow> real\" where\n \"total_price offers \\<equiv> \\<Sum> i \\<leftarrow> offers. price i\"",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>+\\<close> 65)",
"definition Unity :: unit (\\<open>'(')\\<close>... |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.consistent_classical_logic.maximum_payoff_existence | lemma (in consistent_classical_logic) maximum_payoff_existence:
"\<exists>! x. (\<exists> p \<in> possibilities. \<pi> p bets = x)
\<and> (\<forall> q \<in> possibilities. \<pi> q bets \<le> x)" | class.consistent_classical_logic deduction implication falsum \<Longrightarrow> \<exists>!x. (\<exists>p\<in>classical_logic.possibilities deduction implication falsum. \<pi> p bets = x) \<and> (\<forall>q\<in>classical_logic.possibilities deduction implication falsum. \<pi> q bets \<le> x) | H1 x_1 x_2 x_3 \<Longrightarrow> \<exists>!y_0. (\<exists>y_1\<in>H2 x_1 x_2 x_3. H3 y_1 x_4 = y_0) \<and> (\<forall>y_2\<in>H2 x_1 x_2 x_3. H3 y_2 x_4 \<le> y_0) | [
"Arbitrage_Probability_Correspondence.payoff",
"Arbitrage_Probability_Correspondence.classical_logic.possibilities",
"Classical_Logic.class.consistent_classical_logic"
] | [
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a strategy \\<Rightarrow> real",
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarrow> 'a)\n \\<Rightarrow> 'a \\<Rightarrow> ('a \\<Rightarrow> bool) set",
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarr... | [
"definition payoff :: \"('p \\<Rightarrow> bool) \\<Rightarrow> 'p strategy \\<Rightarrow> real\" (\"\\<pi>\") where\n [simp]: \"\\<pi> s strategy \\<equiv>\n (\\<Sum> i \\<leftarrow> bids strategy. (if s (bet i) then 1 else 0) - price i)\n + (\\<Sum> i \\<leftarrow> asks strategy. price i - (if s (bet i) th... |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.consistent_classical_logic.minimum_payoff_existence | lemma (in consistent_classical_logic) minimum_payoff_existence:
"\<exists>! x. (\<exists> p \<in> possibilities. \<pi> p bets = x) \<and> (\<forall> q \<in> possibilities. x \<le> \<pi> q bets)" | class.consistent_classical_logic deduction implication falsum \<Longrightarrow> \<exists>!x. (\<exists>p\<in>classical_logic.possibilities deduction implication falsum. \<pi> p bets = x) \<and> (\<forall>q\<in>classical_logic.possibilities deduction implication falsum. x \<le> \<pi> q bets) | H1 x_1 x_2 x_3 \<Longrightarrow> \<exists>!y_0. (\<exists>y_1\<in>H2 x_1 x_2 x_3. H3 y_1 x_4 = y_0) \<and> (\<forall>y_2\<in>H2 x_1 x_2 x_3. y_0 \<le> H3 y_2 x_4) | [
"Arbitrage_Probability_Correspondence.payoff",
"Arbitrage_Probability_Correspondence.classical_logic.possibilities",
"Classical_Logic.class.consistent_classical_logic"
] | [
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a strategy \\<Rightarrow> real",
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarrow> 'a)\n \\<Rightarrow> 'a \\<Rightarrow> ('a \\<Rightarrow> bool) set",
"('a \\<Rightarrow> bool)\n\\<Rightarrow> ('a \\<Rightarrow> 'a \\<Rightarr... | [
"definition payoff :: \"('p \\<Rightarrow> bool) \\<Rightarrow> 'p strategy \\<Rightarrow> real\" (\"\\<pi>\") where\n [simp]: \"\\<pi> s strategy \\<equiv>\n (\\<Sum> i \\<leftarrow> bids strategy. (if s (bet i) then 1 else 0) - price i)\n + (\\<Sum> i \\<leftarrow> asks strategy. price i - (if s (bet i) th... |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.payoff_alt_def1 | lemma payoff_alt_def1:
"\<pi> s strategy =
(\<Sum> i \<leftarrow> bids strategy. settle_bet s (bet i) - price i)
+ (\<Sum> i \<leftarrow> asks strategy. price i - settle_bet s (bet i))" | \<pi> s strategy = (\<Sum>i\<leftarrow>bids strategy. settle_bet s (bet i) - price i) + (\<Sum>i\<leftarrow>asks strategy. price i - settle_bet s (bet i)) | H1 x_1 x_2 = H2 (H3 (H4 (\<lambda>y_0. H5 (H6 x_1 (H7 y_0)) (H8 y_0)) (H9 x_2))) (H3 (H4 (\<lambda>y_1. H5 (H8 y_1) (H6 x_1 (H7 y_1))) (H10 x_2))) | [
"Arbitrage_Probability_Correspondence.strategy.asks",
"Arbitrage_Probability_Correspondence.strategy.bids",
"Arbitrage_Probability_Correspondence.bet_offer.price",
"Arbitrage_Probability_Correspondence.bet_offer.bet",
"Arbitrage_Probability_Correspondence.settle_bet",
"Groups.minus_class.minus",
"List.l... | [
"('a, 'b) strategy_scheme \\<Rightarrow> 'a bet_offer list",
"('a, 'b) strategy_scheme \\<Rightarrow> 'a bet_offer list",
"('a, 'b) bet_offer_scheme \\<Rightarrow> real",
"('a, 'b) bet_offer_scheme \\<Rightarrow> 'a",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a \\<Rightarrow> real",
"'a \\<Rightarrow> 'a ... | [
"definition settle_bet :: \"('p \\<Rightarrow> bool) \\<Rightarrow> 'p \\<Rightarrow> real\" where\n \"settle_bet s \\<phi> \\<equiv> if (s \\<phi>) then 1 else 0\"",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>-\\<close> 65)",
"class plus =\n fixes plus :: \"'... |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.payoff_alt_def2 | lemma payoff_alt_def2:
"\<pi> s strategy = settle s (bids strategy)
- settle s (asks strategy)
+ total_price (asks strategy)
- total_price (bids strategy)" | \<pi> s strategy = settle s (bids strategy) - settle s (asks strategy) + total_price (asks strategy) - total_price (bids strategy) | H1 x_1 x_2 = H2 (H3 (H2 (H4 x_1 (H5 x_2)) (H4 x_1 (H6 x_2))) (H7 (H6 x_2))) (H7 (H5 x_2)) | [
"Arbitrage_Probability_Correspondence.total_price",
"Arbitrage_Probability_Correspondence.strategy.asks",
"Arbitrage_Probability_Correspondence.strategy.bids",
"Arbitrage_Probability_Correspondence.settle",
"Groups.plus_class.plus",
"Groups.minus_class.minus",
"Arbitrage_Probability_Correspondence.payof... | [
"'a bet_offer list \\<Rightarrow> real",
"('a, 'b) strategy_scheme \\<Rightarrow> 'a bet_offer list",
"('a, 'b) strategy_scheme \\<Rightarrow> 'a bet_offer list",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a bet_offer list \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> '... | [
"definition total_price :: \"('p bet_offer) list \\<Rightarrow> real\" where\n \"total_price offers \\<equiv> \\<Sum> i \\<leftarrow> offers. price i\"",
"definition settle :: \"('p \\<Rightarrow> bool) \\<Rightarrow> 'p bet_offer list \\<Rightarrow> real\" where\n \"settle s bets \\<equiv> \\<Sum> b \\<leftarr... |
Arbitrage_Probability_Correspondence/Arbitrage_Probability_Correspondence | Arbitrage_Probability_Correspondence.settle_alt_def | lemma settle_alt_def:
"settle q bets = length [\<phi> \<leftarrow> [ bet b . b \<leftarrow> bets ] . q \<phi>]" | settle q bets = real (length (filter q (map bet bets))) | H1 x_1 x_2 = H2 (H3 (H4 x_1 (H5 H6 x_2))) | [
"Arbitrage_Probability_Correspondence.bet_offer.bet",
"List.list.map",
"List.filter",
"List.length",
"Real.real",
"Arbitrage_Probability_Correspondence.settle"
] | [
"('a, 'b) bet_offer_scheme \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a list \\<Rightarrow> 'b list",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> 'a list",
"'a list \\<Rightarrow> nat",
"nat \\<Rightarrow> real",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a bet_offer li... | [
"primrec filter:: \"('a \\<Rightarrow> bool) \\<Rightarrow> 'a list \\<Rightarrow> 'a list\" where\n\"filter P [] = []\" |\n\"filter P (x # xs) = (if P x then x # filter P xs else filter P xs)\"",
"abbreviation length :: \"'a list \\<Rightarrow> nat\" where\n\"length \\<equiv> size\"",
"abbreviation real :: \"n... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.base_gross_diff_eq | lemma base_gross_diff_eq:
assumes "clmm_dsc P"
and "L = gross_fct (lq P) (fee P)"
and "j = lower_tick P sqp"
and "k = lower_tick P sqp'"
and "0 < sqp"
and "sqp \<le> sqp'"
and "j < k"
shows "base_gross P sqp - base_gross P sqp' =
L j * (inverse sqp - inverse (grd P (j+1))) +
sum (\<lambda> i. L i * ... | \<lbrakk>clmm_dsc P; L = gross_fct (lq P) (fee P); j = lower_tick P sqp; k = lower_tick P sqp'; 0 < sqp; sqp \<le> sqp'; j < k\<rbrakk> \<Longrightarrow> base_gross P sqp - base_gross P sqp' = L j * (inverse sqp - inverse (grd P (j + 1))) + (\<Sum>i | L i \<noteq> 0 \<and> j < i \<and> i < k. L i * (inverse (grd P i) -... | \<lbrakk>H1 x_1; x_2 = H2 (H3 x_1) (H4 x_1); x_3 = H5 x_1 x_4; x_5 = H5 x_1 x_6; H6 < x_4; x_4 \<le> x_6; x_3 < x_5\<rbrakk> \<Longrightarrow> H7 (H8 x_1 x_4) (H8 x_1 x_6) = H9 (H9 (H10 (x_2 x_3) (H7 (H11 x_4) (H11 (H12 x_1 (H9 x_3 H13))))) (H14 (\<lambda>y_0. H10 (x_2 y_0) (H7 (H11 (H12 x_1 y_0)) (H11 (H12 x_1 (H9 y_0... | [
"Set.Collect",
"Groups_Big.comm_monoid_add_class.sum",
"Groups.one_class.one",
"Grid_Information.grd",
"Fields.inverse_class.inverse",
"Groups.times_class.times",
"Groups.plus_class.plus",
"Grid_Information.base_gross",
"Groups.minus_class.minus",
"Groups.zero_class.zero",
"CLMM_Description.lowe... | [
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"'a \\<Rightarrow> 'a",
"'a \\<Rightarrow>... | [
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\"... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.base_gross_diff_eq' | lemma base_gross_diff_eq':
assumes "clmm_dsc P"
and "L = gross_fct (lq P) (fee P)"
and "j = lower_tick P sqp"
and "j = lower_tick P sqp'"
and "0 < sqp"
and "sqp \<le> sqp'"
shows "base_gross P sqp - base_gross P sqp' = L j * (inverse sqp - inverse sqp')" | \<lbrakk>clmm_dsc P; L = gross_fct (lq P) (fee P); j = lower_tick P sqp; j = lower_tick P sqp'; 0 < sqp; sqp \<le> sqp'\<rbrakk> \<Longrightarrow> base_gross P sqp - base_gross P sqp' = L j * (inverse sqp - inverse sqp') | \<lbrakk>H1 x_1; x_2 = H2 (H3 x_1) (H4 x_1); x_3 = H5 x_1 x_4; x_3 = H5 x_1 x_5; H6 < x_4; x_4 \<le> x_5\<rbrakk> \<Longrightarrow> H7 (H8 x_1 x_4) (H8 x_1 x_5) = H9 (x_2 x_3) (H7 (H10 x_4) (H10 x_5)) | [
"Fields.inverse_class.inverse",
"Groups.times_class.times",
"Grid_Information.base_gross",
"Groups.minus_class.minus",
"Groups.zero_class.zero",
"CLMM_Description.lower_tick",
"Grid_Information.fee",
"Grid_Information.lq",
"CLMM_Misc.gross_fct",
"CLMM_Description.clmm_dsc"
] | [
"'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rig... | [
"class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>*\\<close> 70)",
"definition base_gross where\n\"base_gross P = gen_base (grd P) (gross_fct (lq P) (fee P))\"",
"class minus =\n fixes m... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.base_gross_sum | lemma base_gross_sum:
assumes "clmm_dsc P"
and "0 < sqp"
and "L = gross_fct (lq P) (fee P)"
and "j = lower_tick P sqp"
shows "base_gross P sqp =
L j * (inverse sqp - inverse (grd P (j+1))) +
sum (\<lambda>i. L i * (inverse (grd P i) - inverse (grd P (i+1))))
{i. L i \<noteq> 0 \<and> j < i}" | \<lbrakk>clmm_dsc P; 0 < sqp; L = gross_fct (lq P) (fee P); j = lower_tick P sqp\<rbrakk> \<Longrightarrow> base_gross P sqp = L j * (inverse sqp - inverse (grd P (j + 1))) + (\<Sum>i | L i \<noteq> 0 \<and> j < i. L i * (inverse (grd P i) - inverse (grd P (i + 1)))) | \<lbrakk>H1 x_1; H2 < x_2; x_3 = H3 (H4 x_1) (H5 x_1); x_4 = H6 x_1 x_2\<rbrakk> \<Longrightarrow> H7 x_1 x_2 = H8 (H9 (x_3 x_4) (H10 (H11 x_2) (H11 (H12 x_1 (H8 x_4 H13))))) (H14 (\<lambda>y_0. H9 (x_3 y_0) (H10 (H11 (H12 x_1 y_0)) (H11 (H12 x_1 (H8 y_0 H13))))) (H15 (\<lambda>y_1. x_3 y_1 \<noteq> H2 \<and> x_4 < y_1... | [
"Set.Collect",
"Groups_Big.comm_monoid_add_class.sum",
"Groups.one_class.one",
"Grid_Information.grd",
"Fields.inverse_class.inverse",
"Groups.minus_class.minus",
"Groups.times_class.times",
"Groups.plus_class.plus",
"Grid_Information.base_gross",
"CLMM_Description.lower_tick",
"Grid_Information... | [
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"'a \\<Rightarrow> 'a",
"'a \\<Rightarrow>... | [
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\"... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.base_le_quote_gross | lemma base_le_quote_gross:
assumes "clmm_dsc P'"
and "0 < sqp"
and "sqp \<le> sqp'"
shows "base_gross P' sqp - base_gross P' sqp' \<le>
(quote_gross P' sqp' - quote_gross P' sqp)/(sqp * sqp)" | \<lbrakk>clmm_dsc P'; 0 < sqp; sqp \<le> sqp'\<rbrakk> \<Longrightarrow> base_gross P' sqp - base_gross P' sqp' \<le> (quote_gross P' sqp' - quote_gross P' sqp) / (sqp * sqp) | \<lbrakk>H1 x_1; H2 < x_2; x_2 \<le> x_3\<rbrakk> \<Longrightarrow> H3 (H4 x_1 x_2) (H4 x_1 x_3) \<le> H5 (H3 (H6 x_1 x_3) (H6 x_1 x_2)) (H7 x_2 x_2) | [
"Groups.times_class.times",
"Grid_Information.quote_gross",
"Fields.inverse_class.inverse_divide",
"Grid_Information.base_gross",
"Groups.minus_class.minus",
"Groups.zero_class.zero",
"CLMM_Description.clmm_dsc"
] | [
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<R... | [
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>*\\<close> 70)",
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\"",
"class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin",
"definition base_gross... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.base_net_diff_eq | lemma base_net_diff_eq:
assumes "clmm_dsc P"
and "L = lq P"
and "j = lower_tick P sqp"
and "k = lower_tick P sqp'"
and "0 < sqp"
and "sqp \<le> sqp'"
and "j < k"
shows "base_net P sqp - base_net P sqp' =
L j * (inverse sqp - inverse (grd P (j+1))) +
sum (\<lambda> i. L i * (inverse (grd P i) - inver... | \<lbrakk>clmm_dsc P; L = lq P; j = lower_tick P sqp; k = lower_tick P sqp'; 0 < sqp; sqp \<le> sqp'; j < k\<rbrakk> \<Longrightarrow> base_net P sqp - base_net P sqp' = L j * (inverse sqp - inverse (grd P (j + 1))) + (\<Sum>i | L i \<noteq> 0 \<and> j < i \<and> i < k. L i * (inverse (grd P i) - inverse (grd P (i + 1))... | \<lbrakk>H1 x_1; x_2 = H2 x_1; x_3 = H3 x_1 x_4; x_5 = H3 x_1 x_6; H4 < x_4; x_4 \<le> x_6; x_3 < x_5\<rbrakk> \<Longrightarrow> H5 (H6 x_1 x_4) (H6 x_1 x_6) = H7 (H7 (H8 (x_2 x_3) (H5 (H9 x_4) (H9 (H10 x_1 (H7 x_3 H11))))) (H12 (\<lambda>y_0. H8 (x_2 y_0) (H5 (H9 (H10 x_1 y_0)) (H9 (H10 x_1 (H7 y_0 H11))))) (H13 (\<la... | [
"Set.Collect",
"Groups_Big.comm_monoid_add_class.sum",
"Groups.one_class.one",
"Grid_Information.grd",
"Fields.inverse_class.inverse",
"Groups.times_class.times",
"Groups.plus_class.plus",
"Grid_Information.base_net",
"Groups.minus_class.minus",
"Groups.zero_class.zero",
"CLMM_Description.lower_... | [
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"'a \\<Rightarrow> 'a",
"'a \\<Rightarrow>... | [
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\"... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.base_net_diff_eq' | lemma base_net_diff_eq':
assumes "clmm_dsc P"
and "L = lq P"
and "j = lower_tick P sqp"
and "j = lower_tick P sqp'"
and "0 < sqp"
and "sqp \<le> sqp'"
shows "base_net P sqp - base_net P sqp' = L j * (inverse sqp - inverse sqp')" | \<lbrakk>clmm_dsc P; L = lq P; j = lower_tick P sqp; j = lower_tick P sqp'; 0 < sqp; sqp \<le> sqp'\<rbrakk> \<Longrightarrow> base_net P sqp - base_net P sqp' = L j * (inverse sqp - inverse sqp') | \<lbrakk>H1 x_1; x_2 = H2 x_1; x_3 = H3 x_1 x_4; x_3 = H3 x_1 x_5; H4 < x_4; x_4 \<le> x_5\<rbrakk> \<Longrightarrow> H5 (H6 x_1 x_4) (H6 x_1 x_5) = H7 (x_2 x_3) (H5 (H8 x_4) (H8 x_5)) | [
"Fields.inverse_class.inverse",
"Groups.times_class.times",
"Grid_Information.base_net",
"Groups.minus_class.minus",
"Groups.zero_class.zero",
"CLMM_Description.lower_tick",
"Grid_Information.lq",
"CLMM_Description.clmm_dsc"
] | [
"'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rig... | [
"class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>*\\<close> 70)",
"definition base_net where\n\"base_net P = gen_base (grd P) (lq P)\"",
"class minus =\n fixes minus :: \"'a \\<Rightarr... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.base_net_eq_only_if | lemma base_net_eq_only_if:
assumes "clmm_dsc P"
and "j = lower_tick P sqp"
and "k = lower_tick P sqp'"
and "0 < sqp"
and "sqp \<le> sqp'"
and "j < k"
and "quote_gross P sqp' = quote_gross P sqp"
shows "base_net P sqp' = base_net P sqp" | \<lbrakk>clmm_dsc P; j = lower_tick P sqp; k = lower_tick P sqp'; 0 < sqp; sqp \<le> sqp'; j < k; quote_gross P sqp' = quote_gross P sqp\<rbrakk> \<Longrightarrow> base_net P sqp' = base_net P sqp | \<lbrakk>H1 x_1; x_2 = H2 x_1 x_3; x_4 = H2 x_1 x_5; H3 < x_3; x_3 \<le> x_5; x_2 < x_4; H4 x_1 x_5 = H4 x_1 x_3\<rbrakk> \<Longrightarrow> H5 x_1 x_5 = H5 x_1 x_3 | [
"Grid_Information.base_net",
"Grid_Information.quote_gross",
"Groups.zero_class.zero",
"CLMM_Description.lower_tick",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a",
"(int \\<Rightarro... | [
"definition base_net where\n\"base_net P = gen_base (grd P) (lq P)\"",
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\"",
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition lower_tick where\n\"lower_tick P prc = Sup (rng_blw P prc)\"",
"defin... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.base_net_eq_only_if' | lemma base_net_eq_only_if':
assumes "clmm_dsc P"
and "L = lq P"
and "j = lower_tick P sqp"
and "j = lower_tick P sqp'"
and "0 < sqp"
and "sqp \<le> sqp'"
and "quote_gross P sqp = quote_gross P sqp'"
shows "base_net P sqp = base_net P sqp'" | \<lbrakk>clmm_dsc P; L = lq P; j = lower_tick P sqp; j = lower_tick P sqp'; 0 < sqp; sqp \<le> sqp'; quote_gross P sqp = quote_gross P sqp'\<rbrakk> \<Longrightarrow> base_net P sqp = base_net P sqp' | \<lbrakk>H1 x_1; x_2 = H2 x_1; x_3 = H3 x_1 x_4; x_3 = H3 x_1 x_5; H4 < x_4; x_4 \<le> x_5; H5 x_1 x_4 = H5 x_1 x_5\<rbrakk> \<Longrightarrow> H6 x_1 x_4 = H6 x_1 x_5 | [
"Grid_Information.base_net",
"Grid_Information.quote_gross",
"Groups.zero_class.zero",
"CLMM_Description.lower_tick",
"Grid_Information.lq",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a",
"(int \\<Rightarro... | [
"definition base_net where\n\"base_net P = gen_base (grd P) (lq P)\"",
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\"",
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition lower_tick where\n\"lower_tick P prc = Sup (rng_blw P prc)\"",
"defin... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.base_net_grd_min_le | lemma base_net_grd_min_le:
assumes "clmm_dsc P"
and "sqp \<le> grd_min P"
and "0 < sqp"
shows "base_net P sqp = base_net P (grd_min P)" | \<lbrakk>clmm_dsc P; sqp \<le> grd_min P; 0 < sqp\<rbrakk> \<Longrightarrow> base_net P sqp = base_net P (grd_min P) | \<lbrakk>H1 x_1; x_2 \<le> H2 x_1; H3 < x_2\<rbrakk> \<Longrightarrow> H4 x_1 x_2 = H4 x_1 (H2 x_1) | [
"Grid_Information.base_net",
"Groups.zero_class.zero",
"Grid_Information.grd_min",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n... | [
"definition base_net where\n\"base_net P = gen_base (grd P) (lq P)\"",
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition grd_min where\n \"grd_min P = idx_min_img (grd P) (lq P)\"",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (finite_liq P) \\<and... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.base_net_grd_min_lt | lemma base_net_grd_min_lt:
assumes "clmm_dsc P"
and "sqp < grd_min P"
and "0 < sqp"
shows "base_net P sqp = base_net P (grd_min P)" | \<lbrakk>clmm_dsc P; sqp < grd_min P; 0 < sqp\<rbrakk> \<Longrightarrow> base_net P sqp = base_net P (grd_min P) | \<lbrakk>H1 x_1; x_2 < H2 x_1; H3 < x_2\<rbrakk> \<Longrightarrow> H4 x_1 x_2 = H4 x_1 (H2 x_1) | [
"Grid_Information.base_net",
"Groups.zero_class.zero",
"Grid_Information.grd_min",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n... | [
"definition base_net where\n\"base_net P = gen_base (grd P) (lq P)\"",
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition grd_min where\n \"grd_min P = idx_min_img (grd P) (lq P)\"",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (finite_liq P) \\<and... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.base_net_quote_lbound | lemma base_net_quote_lbound:
assumes "clmm_dsc P'"
and "\<And>i. fee P' i = phi"
and "0 < sqp"
and "sqp \<le> sqp'"
shows "(1 - phi) * (quote_gross P' sqp' - quote_gross P' sqp)/(sqp' * sqp') \<le>
base_net P' sqp - base_net P' sqp'" | \<lbrakk>clmm_dsc P'; \<And>i. fee P' i = phi; 0 < sqp; sqp \<le> sqp'\<rbrakk> \<Longrightarrow> (1 - phi) * (quote_gross P' sqp' - quote_gross P' sqp) / (sqp' * sqp') \<le> base_net P' sqp - base_net P' sqp' | \<lbrakk>H1 x_1; \<And>y_0. H2 x_1 y_0 = x_2; H3 < x_3; x_3 \<le> x_4\<rbrakk> \<Longrightarrow> H4 (H5 (H6 H7 x_2) (H6 (H8 x_1 x_4) (H8 x_1 x_3))) (H5 x_4 x_4) \<le> H6 (H9 x_1 x_3) (H9 x_1 x_4) | [
"Grid_Information.base_net",
"Grid_Information.quote_gross",
"Groups.one_class.one",
"Groups.minus_class.minus",
"Groups.times_class.times",
"Fields.inverse_class.inverse_divide",
"Groups.zero_class.zero",
"Grid_Information.fee",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a",
"'a \\<Rightarrow>... | [
"definition base_net where\n\"base_net P = gen_base (grd P) (lq P)\"",
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\"",
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.base_net_quote_ubound | lemma base_net_quote_ubound:
assumes "clmm_dsc P'"
and "\<And>i. fee P' i = phi"
and "phi < 1"
and "0 < sqp"
and "sqp \<le> sqp'"
shows "base_net P' sqp - base_net P' sqp' \<le>
(1 - phi) * (quote_gross P' sqp' - quote_gross P' sqp)/(sqp * sqp)" | \<lbrakk>clmm_dsc P'; \<And>i. fee P' i = phi; phi < 1; 0 < sqp; sqp \<le> sqp'\<rbrakk> \<Longrightarrow> base_net P' sqp - base_net P' sqp' \<le> (1 - phi) * (quote_gross P' sqp' - quote_gross P' sqp) / (sqp * sqp) | \<lbrakk>H1 x_1; \<And>y_0. H2 x_1 y_0 = x_2; x_2 < H3; H4 < x_3; x_3 \<le> x_4\<rbrakk> \<Longrightarrow> H5 (H6 x_1 x_3) (H6 x_1 x_4) \<le> H7 (H8 (H5 H3 x_2) (H5 (H9 x_1 x_4) (H9 x_1 x_3))) (H8 x_3 x_3) | [
"Grid_Information.quote_gross",
"Groups.times_class.times",
"Fields.inverse_class.inverse_divide",
"Grid_Information.base_net",
"Groups.minus_class.minus",
"Groups.zero_class.zero",
"Groups.one_class.one",
"Grid_Information.fee",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<R... | [
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\"",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>*\\<close> 70)",
"class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin",
"definition base_net w... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.base_net_sum | lemma base_net_sum:
assumes "clmm_dsc P"
and "0 < sqp"
and "L = lq P"
and "j = lower_tick P sqp"
shows "base_net P sqp =
L j * (inverse sqp - inverse (grd P (j+1))) +
sum (\<lambda>i. L i * (inverse (grd P i) - inverse (grd P (i+1))))
{i. L i \<noteq> 0 \<and> j < i}" | \<lbrakk>clmm_dsc P; 0 < sqp; L = lq P; j = lower_tick P sqp\<rbrakk> \<Longrightarrow> base_net P sqp = L j * (inverse sqp - inverse (grd P (j + 1))) + (\<Sum>i | L i \<noteq> 0 \<and> j < i. L i * (inverse (grd P i) - inverse (grd P (i + 1)))) | \<lbrakk>H1 x_1; H2 < x_2; x_3 = H3 x_1; x_4 = H4 x_1 x_2\<rbrakk> \<Longrightarrow> H5 x_1 x_2 = H6 (H7 (x_3 x_4) (H8 (H9 x_2) (H9 (H10 x_1 (H6 x_4 H11))))) (H12 (\<lambda>y_0. H7 (x_3 y_0) (H8 (H9 (H10 x_1 y_0)) (H9 (H10 x_1 (H6 y_0 H11))))) (H13 (\<lambda>y_1. x_3 y_1 \<noteq> H2 \<and> x_4 < y_1))) | [
"Set.Collect",
"Groups_Big.comm_monoid_add_class.sum",
"Groups.one_class.one",
"Grid_Information.grd",
"Fields.inverse_class.inverse",
"Groups.minus_class.minus",
"Groups.times_class.times",
"Groups.plus_class.plus",
"Grid_Information.base_net",
"CLMM_Description.lower_tick",
"Grid_Information.l... | [
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"'a \\<Rightarrow> 'a",
"'a \\<Rightarrow>... | [
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"class inverse = divide +\n fixes inverse :: \"'a \\<Rightarrow> 'a\"\nbegin",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\"... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_base_gross_antimono | lemma clmm_base_gross_antimono:
assumes "clmm_dsc P"
shows "antimono (base_gross P)" | clmm_dsc P \<Longrightarrow> antimono_on UNIV (base_gross P) | H1 x_1 \<Longrightarrow> H2 H3 (H4 x_1) | [
"Grid_Information.base_gross",
"Set.UNIV",
"Fun.ord_class.antimono_on",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a set",
"'a set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightar... | [
"definition base_gross where\n\"base_gross P = gen_base (grd P) (gross_fct (lq P) (fee P))\"",
"abbreviation UNIV :: \"'a set\"\n where \"UNIV \\<equiv> top\"",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (finite_liq P) \\<and> (\\<forall>i. 0 \\<le> lq P i) \\<and>\n ... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_base_gross_grd_max | lemma clmm_base_gross_grd_max:
assumes "clmm_dsc P"
and "nz_support (lq P) \<noteq> {}"
shows "base_gross P (grd_max P) = 0" | \<lbrakk>clmm_dsc P; nz_support (lq P) \<noteq> {}\<rbrakk> \<Longrightarrow> base_gross P (grd_max P) = 0 | \<lbrakk>H1 x_1; H2 (H3 x_1) \<noteq> H4\<rbrakk> \<Longrightarrow> H5 x_1 (H6 x_1) = H7 | [
"Groups.zero_class.zero",
"Grid_Information.grd_max",
"Grid_Information.base_gross",
"Set.empty",
"Grid_Information.lq",
"CLMM_Misc.nz_support",
"CLMM_Description.clmm_dsc"
] | [
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a set",
"(int \\<Rightarrow> real)... | [
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition grd_max where\n \"grd_max P = idx_max_img (grd P) (lq P)\"",
"definition base_gross where\n\"base_gross P = gen_base (grd P) (gross_fct (lq P) (fee P))\"",
"abbreviation empty :: \"'a set\" (\\<open>{}\\<close>)\n where \"{} \\<equiv> bot... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_base_net_antimono | lemma clmm_base_net_antimono:
assumes "clmm_dsc P"
shows "antimono (base_net P)" | clmm_dsc P \<Longrightarrow> antimono_on UNIV (base_net P) | H1 x_1 \<Longrightarrow> H2 H3 (H4 x_1) | [
"Grid_Information.base_net",
"Set.UNIV",
"Fun.ord_class.antimono_on",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a set",
"'a set \\<Rightarrow> ('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightar... | [
"definition base_net where\n\"base_net P = gen_base (grd P) (lq P)\"",
"abbreviation UNIV :: \"'a set\"\n where \"UNIV \\<equiv> top\"",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (finite_liq P) \\<and> (\\<forall>i. 0 \\<le> lq P i) \\<and>\n (\\<forall>i. 0 \\<le> ... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_dscI | lemma clmm_dscI[intro]:
assumes "span_grid P"
and "finite_liq P"
and "\<forall>i. 0 \<le> lq P i"
and "\<forall>i. 0 \<le> fee P i"
and "\<forall>i. fee P i < 1"
shows "clmm_dsc P" | \<lbrakk>span_grid P; finite_liq P; \<forall>i. 0 \<le> lq P i; \<forall>i. 0 \<le> fee P i; \<forall>i. fee P i < 1\<rbrakk> \<Longrightarrow> clmm_dsc P | \<lbrakk>H1 x_1; H2 x_1; \<forall>y_0. H3 \<le> H4 x_1 y_0; \<forall>y_1. H3 \<le> H5 x_1 y_1; \<forall>y_2. H5 x_1 y_2 < H6\<rbrakk> \<Longrightarrow> H7 x_1 | [
"CLMM_Description.clmm_dsc",
"Groups.one_class.one",
"Grid_Information.fee",
"Grid_Information.lq",
"Groups.zero_class.zero",
"Grid_Information.finite_liq",
"Grid_Information.span_grid"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(... | [
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (finite_liq P) \\<and> (\\<forall>i. 0 \\<le> lq P i) \\<and>\n (\\<forall>i. 0 \\<le> fee P i) \\<and> (\\<forall>i. fee P i < 1)\"",
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"definition fee::\"grid_info \\<R... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_dsc_fees | lemma clmm_dsc_fees:
assumes "clmm_dsc P"
shows "(\<forall>i. 0 \<le> fee P i) \<and> (\<forall>i. fee P i < 1)" | clmm_dsc P \<Longrightarrow> (\<forall>i. 0 \<le> fee P i) \<and> (\<forall>i. fee P i < 1) | H1 x_1 \<Longrightarrow> (\<forall>y_0. H2 \<le> H3 x_1 y_0) \<and> (\<forall>y_1. H3 x_1 y_1 < H4) | [
"Groups.one_class.one",
"Grid_Information.fee",
"Groups.zero_class.zero",
"CLMM_Description.clmm_dsc"
] | [
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool"
] | [
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"definition fee::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"fee P = snd (snd P)\"",
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (fini... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_dsc_fees_neq_1 | lemma clmm_dsc_fees_neq_1:
assumes "clmm_dsc P"
shows "\<forall>i. fee P i \<noteq> 1" | clmm_dsc P \<Longrightarrow> \<forall>i. fee P i \<noteq> 1 | H1 x_1 \<Longrightarrow> \<forall>y_0. H2 x_1 y_0 \<noteq> H3 | [
"Groups.one_class.one",
"Grid_Information.fee",
"CLMM_Description.clmm_dsc"
] | [
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool"
] | [
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"definition fee::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"fee P = snd (snd P)\"",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (finite_liq P) \\<and> (\\<forall>i. 0 \\<le> lq P i) \\<and>\n ... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_dsc_grd_Suc | lemma clmm_dsc_grd_Suc:
assumes "clmm_dsc P"
shows "grd P i < grd P (i+1)" | clmm_dsc P \<Longrightarrow> grd P i < grd P (i + 1) | H1 x_1 \<Longrightarrow> H2 x_1 x_2 < H2 x_1 (H3 x_2 H4) | [
"Groups.one_class.one",
"Groups.plus_class.plus",
"Grid_Information.grd",
"CLMM_Description.clmm_dsc"
] | [
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool... | [
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>+\\<close> 65)",
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"definition clmm_dsc where\n\"clmm_dsc P \\<lon... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_dsc_grd_mono | lemma clmm_dsc_grd_mono:
assumes "clmm_dsc P"
and "i \<le> j"
shows "grd P i \<le> grd P j" | \<lbrakk>clmm_dsc P; i \<le> j\<rbrakk> \<Longrightarrow> grd P i \<le> grd P j | \<lbrakk>H1 x_1; x_2 \<le> x_3\<rbrakk> \<Longrightarrow> H2 x_1 x_2 \<le> H2 x_1 x_3 | [
"Grid_Information.grd",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool"
] | [
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (finite_liq P) \\<and> (\\<forall>i. 0 \\<le> lq P i) \\<and>\n (\\<forall>i. 0 \\<le> fee P i) \\<and> (\\<forall>i. fee P i < 1... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_dsc_grd_smono | lemma clmm_dsc_grd_smono:
assumes "clmm_dsc P"
and "i < j"
shows "grd P i < grd P j" | \<lbrakk>clmm_dsc P; i < j\<rbrakk> \<Longrightarrow> grd P i < grd P j | \<lbrakk>H1 x_1; x_2 < x_3\<rbrakk> \<Longrightarrow> H2 x_1 x_2 < H2 x_1 x_3 | [
"Grid_Information.grd",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool"
] | [
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (finite_liq P) \\<and> (\\<forall>i. 0 \\<le> lq P i) \\<and>\n (\\<forall>i. 0 \\<le> fee P i) \\<and> (\\<forall>i. fee P i < 1... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_dsc_grid(1) | lemma clmm_dsc_grid[simp]:
assumes "clmm_dsc P"
shows "strict_mono (grd P)" "(\<forall>i. 0 < grd P i)"
"(\<forall>r>0. \<exists>i. grd P i < r)" "(\<forall>r. \<exists>i. r < grd P i)" | clmm_dsc P \<Longrightarrow> strict_mono (grd P) | H1 x_1 \<Longrightarrow> H2 (H3 x_1) | [
"Grid_Information.grd",
"Fun.order_class.strict_mono",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool"
] | [
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (finite_liq P) \\<and> (\\<forall>i. 0 \\<le> lq P i) \\<and>\n (\\<forall>i. 0 \\<le> fee P i) \\<and> (\\<forall>i. fee P i < 1... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_dsc_grid(2) | lemma clmm_dsc_grid[simp]:
assumes "clmm_dsc P"
shows "strict_mono (grd P)" "(\<forall>i. 0 < grd P i)"
"(\<forall>r>0. \<exists>i. grd P i < r)" "(\<forall>r. \<exists>i. r < grd P i)" | clmm_dsc P \<Longrightarrow> \<forall>i. 0 < grd P i | H1 x_1 \<Longrightarrow> \<forall>y_0. H2 < H3 x_1 y_0 | [
"Grid_Information.grd",
"Groups.zero_class.zero",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool"
] | [
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (finite_liq P) \\<and> (\\<forall>i. 0 \\<le> lq P i) \\<and>\n (\\<f... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_dsc_grid(3) | lemma clmm_dsc_grid[simp]:
assumes "clmm_dsc P"
shows "strict_mono (grd P)" "(\<forall>i. 0 < grd P i)"
"(\<forall>r>0. \<exists>i. grd P i < r)" "(\<forall>r. \<exists>i. r < grd P i)" | clmm_dsc P \<Longrightarrow> \<forall>r>0. \<exists>i. grd P i < r | H1 x_1 \<Longrightarrow> \<forall>y_0>H2. \<exists>y_1. H3 x_1 y_1 < y_0 | [
"Grid_Information.grd",
"Groups.zero_class.zero",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool"
] | [
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (finite_liq P) \\<and> (\\<forall>i. 0 \\<le> lq P i) \\<and>\n (\\<f... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_dsc_grid(4) | lemma clmm_dsc_grid[simp]:
assumes "clmm_dsc P"
shows "strict_mono (grd P)" "(\<forall>i. 0 < grd P i)"
"(\<forall>r>0. \<exists>i. grd P i < r)" "(\<forall>r. \<exists>i. r < grd P i)" | clmm_dsc P \<Longrightarrow> \<forall>r. \<exists>i. r < grd P i | H1 x_1 \<Longrightarrow> \<forall>y_0. \<exists>y_1. y_0 < H2 x_1 y_1 | [
"Grid_Information.grd",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool"
] | [
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (finite_liq P) \\<and> (\\<forall>i. 0 \\<le> lq P i) \\<and>\n (\\<forall>i. 0 \\<le> fee P i) \\<and> (\\<forall>i. fee P i < 1... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_dsc_gross_liq | lemma clmm_dsc_gross_liq:
assumes "clmm_dsc P"
shows "nz_support (gross_fct (lq P) (fee P)) = nz_support (lq P)" | clmm_dsc P \<Longrightarrow> nz_support (gross_fct (lq P) (fee P)) = nz_support (lq P) | H1 x_1 \<Longrightarrow> H2 (H3 (H4 x_1) (H5 x_1)) = H2 (H4 x_1) | [
"Grid_Information.fee",
"Grid_Information.lq",
"CLMM_Misc.gross_fct",
"CLMM_Misc.nz_support",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"(int \\<Rightarrow> real)\n... | [
"definition fee::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"fee P = snd (snd P)\"",
"definition lq::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"lq P = fst (snd P)\"",
"definition gross_fct where\n\"gross_fct f phi = (\\<lambda>i. f i / (one_cpl phi i))\"",
"definition nz... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_dsc_gross_liq_zero_iff | lemma clmm_dsc_gross_liq_zero_iff:
assumes "clmm_dsc P"
shows "(lq P i = 0) \<longleftrightarrow> (gross_fct (lq P) (fee P) i = 0)" | clmm_dsc P \<Longrightarrow> (lq P i = 0) = (gross_fct (lq P) (fee P) i = 0) | H1 x_1 \<Longrightarrow> (H2 x_1 x_2 = H3) = (H4 (H2 x_1) (H5 x_1) x_2 = H3) | [
"Grid_Information.fee",
"CLMM_Misc.gross_fct",
"Groups.zero_class.zero",
"Grid_Information.lq",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"(int \\<Rightarrow> real)\n\\<Rightarrow> (int \\<Rightarrow> real) \\<Rightarrow> int \\<Rightarrow> real",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Righta... | [
"definition fee::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"fee P = snd (snd P)\"",
"definition gross_fct where\n\"gross_fct f phi = (\\<lambda>i. f i / (one_cpl phi i))\"",
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition lq::\"grid_info \\<Rightarrow> (int\\<Rightarr... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_dsc_liq(1) | lemma clmm_dsc_liq:
assumes "clmm_dsc P"
shows "finite_liq P" "0 \<le> lq P i" | clmm_dsc P \<Longrightarrow> finite_liq P | H1 x_1 \<Longrightarrow> H2 x_1 | [
"Grid_Information.finite_liq",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool"
] | [
"definition finite_liq where\n\"finite_liq P \\<longleftrightarrow> finite (nz_support (lq P))\"",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (finite_liq P) \\<and> (\\<forall>i. 0 \\<le> lq P i) \\<and>\n (\\<forall>i. 0 \\<le> fee P i) \\<and> (\\<forall>i. fee P i < ... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_dsc_liq(2) | lemma clmm_dsc_liq:
assumes "clmm_dsc P"
shows "finite_liq P" "0 \<le> lq P i" | clmm_dsc P \<Longrightarrow> 0 \<le> lq P i | H1 x_1 \<Longrightarrow> H2 \<le> H3 x_1 x_2 | [
"Grid_Information.lq",
"Groups.zero_class.zero",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool"
] | [
"definition lq::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"lq P = fst (snd P)\"",
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (finite_liq P) \\<and> (\\<forall>i. 0 \\<le> lq P i) \\<and>\n (... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_dsc_span_grid | lemma clmm_dsc_span_grid:
assumes "clmm_dsc P"
shows "span_grid P" | clmm_dsc P \<Longrightarrow> span_grid P | H1 x_1 \<Longrightarrow> H2 x_1 | [
"Grid_Information.span_grid",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool"
] | [
"definition span_grid where\n\"span_grid P \\<longleftrightarrow> strict_mono (grd P) \\<and> (\\<forall>i. 0 < grd P i) \\<and>\n (\\<forall>r>0. \\<exists>i. grd P i < r) \\<and> (\\<forall> r. \\<exists>i. r < grd P i)\"",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and>... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_gen_quote_grd_min | lemma clmm_gen_quote_grd_min:
assumes "clmm_dsc P"
and "nz_support L \<noteq> {}"
and "finite (nz_support L)"
and "nz_support L = nz_support (lq P)"
shows "gen_quote (grd P) L (grd_min P) = 0" | \<lbrakk>clmm_dsc P; nz_support L \<noteq> {}; finite (nz_support L); nz_support L = nz_support (lq P)\<rbrakk> \<Longrightarrow> gen_quote (grd P) L (grd_min P) = 0 | \<lbrakk>H1 x_1; H2 x_2 \<noteq> H3; H4 (H2 x_2); H2 x_2 = H2 (H5 x_1)\<rbrakk> \<Longrightarrow> H6 (H7 x_1) x_2 (H8 x_1) = H9 | [
"Groups.zero_class.zero",
"Grid_Information.grd_min",
"Grid_Information.grd",
"Grid_Information.gen_quote",
"Grid_Information.lq",
"Finite_Set.finite",
"Set.empty",
"CLMM_Misc.nz_support",
"CLMM_Description.clmm_dsc"
] | [
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"(int \\<Rightarrow> real)\n\\<Rightarr... | [
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition grd_min where\n \"grd_min P = idx_min_img (grd P) (lq P)\"",
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"definition gen_quote where\n\"gen_quote = (\\<lambda> gamma L pi. gen_token (ga... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_gross_diff_eq | lemma clmm_quote_gross_diff_eq:
assumes "clmm_dsc P"
and "L = gross_fct (lq P) (fee P)"
and "j = lower_tick P sqp"
and "k = lower_tick P sqp'"
and "0 < sqp"
and "sqp \<le> sqp'"
and "j < k"
shows "quote_gross P sqp' - quote_gross P sqp = L k * (sqp' - grd P k) +
sum (\<lambda> i. L i * (grd P (i+1) - g... | \<lbrakk>clmm_dsc P; L = gross_fct (lq P) (fee P); j = lower_tick P sqp; k = lower_tick P sqp'; 0 < sqp; sqp \<le> sqp'; j < k\<rbrakk> \<Longrightarrow> quote_gross P sqp' - quote_gross P sqp = L k * (sqp' - grd P k) + (\<Sum>i | L i \<noteq> 0 \<and> j < i \<and> i < k. L i * (grd P (i + 1) - grd P i)) + L j * (grd P... | \<lbrakk>H1 x_1; x_2 = H2 (H3 x_1) (H4 x_1); x_3 = H5 x_1 x_4; x_5 = H5 x_1 x_6; H6 < x_4; x_4 \<le> x_6; x_3 < x_5\<rbrakk> \<Longrightarrow> H7 (H8 x_1 x_6) (H8 x_1 x_4) = H9 (H9 (H10 (x_2 x_5) (H7 x_6 (H11 x_1 x_5))) (H12 (\<lambda>y_0. H10 (x_2 y_0) (H7 (H11 x_1 (H9 y_0 H13)) (H11 x_1 y_0))) (H14 (\<lambda>y_1. x_2... | [
"Set.Collect",
"Groups.one_class.one",
"Groups_Big.comm_monoid_add_class.sum",
"Grid_Information.grd",
"Groups.times_class.times",
"Groups.plus_class.plus",
"Grid_Information.quote_gross",
"Groups.minus_class.minus",
"Groups.zero_class.zero",
"CLMM_Description.lower_tick",
"Grid_Information.fee"... | [
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
... | [
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>*\\<close> 70)",
"class plus =\n fixes plus :: \"'a \\<Righta... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_gross_diff_eq' | lemma clmm_quote_gross_diff_eq':
assumes "clmm_dsc P"
and "L = gross_fct (lq P) (fee P) "
and "j = lower_tick P sqp"
and "j = lower_tick P sqp'"
and "0 < sqp"
and "sqp \<le> sqp'"
shows "quote_gross P sqp' - quote_gross P sqp = L j * (sqp' - sqp)" | \<lbrakk>clmm_dsc P; L = gross_fct (lq P) (fee P); j = lower_tick P sqp; j = lower_tick P sqp'; 0 < sqp; sqp \<le> sqp'\<rbrakk> \<Longrightarrow> quote_gross P sqp' - quote_gross P sqp = L j * (sqp' - sqp) | \<lbrakk>H1 x_1; x_2 = H2 (H3 x_1) (H4 x_1); x_3 = H5 x_1 x_4; x_3 = H5 x_1 x_5; H6 < x_4; x_4 \<le> x_5\<rbrakk> \<Longrightarrow> H7 (H8 x_1 x_5) (H8 x_1 x_4) = H9 (x_2 x_3) (H7 x_5 x_4) | [
"Groups.times_class.times",
"Grid_Information.quote_gross",
"Groups.minus_class.minus",
"Groups.zero_class.zero",
"CLMM_Description.lower_tick",
"Grid_Information.fee",
"Grid_Information.lq",
"CLMM_Misc.gross_fct",
"CLMM_Description.clmm_dsc"
] | [
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (... | [
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>*\\<close> 70)",
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\"",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>-\\<close> ... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_gross_eq_lower_only_if | lemma clmm_quote_gross_eq_lower_only_if:
assumes "clmm_dsc P"
and "L = gross_fct (lq P) (fee P)"
and "j = lower_tick P sqp"
and "k = lower_tick P sqp'"
and "0 < sqp"
and "sqp \<le> sqp'"
and "j < k"
and "quote_gross P sqp' = quote_gross P sqp"
shows "L j = 0" | \<lbrakk>clmm_dsc P; L = gross_fct (lq P) (fee P); j = lower_tick P sqp; k = lower_tick P sqp'; 0 < sqp; sqp \<le> sqp'; j < k; quote_gross P sqp' = quote_gross P sqp\<rbrakk> \<Longrightarrow> L j = 0 | \<lbrakk>H1 x_1; x_2 = H2 (H3 x_1) (H4 x_1); x_3 = H5 x_1 x_4; x_5 = H5 x_1 x_6; H6 < x_4; x_4 \<le> x_6; x_3 < x_5; H7 x_1 x_6 = H7 x_1 x_4\<rbrakk> \<Longrightarrow> x_2 x_3 = H6 | [
"Grid_Information.quote_gross",
"Groups.zero_class.zero",
"CLMM_Description.lower_tick",
"Grid_Information.fee",
"Grid_Information.lq",
"CLMM_Misc.gross_fct",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> int",
"(int \\<Rightarrow... | [
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\"",
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition lower_tick where\n\"lower_tick P prc = Sup (rng_blw P prc)\"",
"definition fee::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_gross_eq_lower_only_if' | lemma clmm_quote_gross_eq_lower_only_if':
assumes "clmm_dsc P"
and "L = gross_fct (lq P) (fee P) "
and "j = lower_tick P sqp"
and "j = lower_tick P sqp'"
and "0 < sqp"
and "sqp < sqp'"
and "quote_gross P sqp' = quote_gross P sqp"
shows "L j = 0" | \<lbrakk>clmm_dsc P; L = gross_fct (lq P) (fee P); j = lower_tick P sqp; j = lower_tick P sqp'; 0 < sqp; sqp < sqp'; quote_gross P sqp' = quote_gross P sqp\<rbrakk> \<Longrightarrow> L j = 0 | \<lbrakk>H1 x_1; x_2 = H2 (H3 x_1) (H4 x_1); x_3 = H5 x_1 x_4; x_3 = H5 x_1 x_5; H6 < x_4; x_4 < x_5; H7 x_1 x_5 = H7 x_1 x_4\<rbrakk> \<Longrightarrow> x_2 x_3 = H6 | [
"Grid_Information.quote_gross",
"Groups.zero_class.zero",
"CLMM_Description.lower_tick",
"Grid_Information.fee",
"Grid_Information.lq",
"CLMM_Misc.gross_fct",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> int",
"(int \\<Rightarrow... | [
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\"",
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition lower_tick where\n\"lower_tick P prc = Sup (rng_blw P prc)\"",
"definition fee::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_gross_eq_sum_emp | lemma clmm_quote_gross_eq_sum_emp:
assumes "clmm_dsc P"
and "L = gross_fct (lq P) (fee P)"
and "j = lower_tick P sqp"
and "k = lower_tick P sqp'"
and "0 < sqp"
and "sqp \<le> sqp'"
and "j < k"
and "quote_gross P sqp' = quote_gross P sqp"
shows "{i. L i \<noteq> 0 \<and> j <i \<and> i < k} = {}" | \<lbrakk>clmm_dsc P; L = gross_fct (lq P) (fee P); j = lower_tick P sqp; k = lower_tick P sqp'; 0 < sqp; sqp \<le> sqp'; j < k; quote_gross P sqp' = quote_gross P sqp\<rbrakk> \<Longrightarrow> {i. L i \<noteq> 0 \<and> j < i \<and> i < k} = {} | \<lbrakk>H1 x_1; x_2 = H2 (H3 x_1) (H4 x_1); x_3 = H5 x_1 x_4; x_5 = H5 x_1 x_6; H6 < x_4; x_4 \<le> x_6; x_3 < x_5; H7 x_1 x_6 = H7 x_1 x_4\<rbrakk> \<Longrightarrow> H8 (\<lambda>y_0. x_2 y_0 \<noteq> H6 \<and> x_3 < y_0 \<and> y_0 < x_5) = H9 | [
"Set.empty",
"Set.Collect",
"Grid_Information.quote_gross",
"Groups.zero_class.zero",
"CLMM_Description.lower_tick",
"Grid_Information.fee",
"Grid_Information.lq",
"CLMM_Misc.gross_fct",
"CLMM_Description.clmm_dsc"
] | [
"'a set",
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)... | [
"abbreviation empty :: \"'a set\" (\\<open>{}\\<close>)\n where \"{} \\<equiv> bot\"",
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\"",
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition lower_tick where\n\"lower_tick P prc = Sup (rng_blw P ... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_gross_eq_sum_only_if | lemma clmm_quote_gross_eq_sum_only_if:
assumes "clmm_dsc P"
and "L = gross_fct (lq P) (fee P)"
and "j = lower_tick P sqp"
and "k = lower_tick P sqp'"
and "0 < sqp"
and "sqp \<le> sqp'"
and "j < k"
and "quote_gross P sqp' = quote_gross P sqp"
and "j < i"
and "i < k"
shows "L i = 0" | \<lbrakk>clmm_dsc P; L = gross_fct (lq P) (fee P); j = lower_tick P sqp; k = lower_tick P sqp'; 0 < sqp; sqp \<le> sqp'; j < k; quote_gross P sqp' = quote_gross P sqp; j < i; i < k\<rbrakk> \<Longrightarrow> L i = 0 | \<lbrakk>H1 x_1; x_2 = H2 (H3 x_1) (H4 x_1); x_3 = H5 x_1 x_4; x_5 = H5 x_1 x_6; H6 < x_4; x_4 \<le> x_6; x_3 < x_5; H7 x_1 x_6 = H7 x_1 x_4; x_3 < x_7; x_7 < x_5\<rbrakk> \<Longrightarrow> x_2 x_7 = H6 | [
"Grid_Information.quote_gross",
"Groups.zero_class.zero",
"CLMM_Description.lower_tick",
"Grid_Information.fee",
"Grid_Information.lq",
"CLMM_Misc.gross_fct",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> int",
"(int \\<Rightarrow... | [
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\"",
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition lower_tick where\n\"lower_tick P prc = Sup (rng_blw P prc)\"",
"definition fee::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_gross_eq_upper_only_if | lemma clmm_quote_gross_eq_upper_only_if:
assumes "clmm_dsc P"
and "L = gross_fct (lq P) (fee P)"
and "j = lower_tick P sqp"
and "k = lower_tick P sqp'"
and "0 < sqp"
and "sqp \<le> sqp'"
and "j < k"
and "quote_gross P sqp' = quote_gross P sqp"
shows "L k = 0 \<or> grd P k = sqp'" | \<lbrakk>clmm_dsc P; L = gross_fct (lq P) (fee P); j = lower_tick P sqp; k = lower_tick P sqp'; 0 < sqp; sqp \<le> sqp'; j < k; quote_gross P sqp' = quote_gross P sqp\<rbrakk> \<Longrightarrow> L k = 0 \<or> grd P k = sqp' | \<lbrakk>H1 x_1; x_2 = H2 (H3 x_1) (H4 x_1); x_3 = H5 x_1 x_4; x_5 = H5 x_1 x_6; H6 < x_4; x_4 \<le> x_6; x_3 < x_5; H7 x_1 x_6 = H7 x_1 x_4\<rbrakk> \<Longrightarrow> x_2 x_5 = H6 \<or> H8 x_1 x_5 = x_6 | [
"Grid_Information.grd",
"Grid_Information.quote_gross",
"Groups.zero_class.zero",
"CLMM_Description.lower_tick",
"Grid_Information.fee",
"Grid_Information.lq",
"CLMM_Misc.gross_fct",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a",
"(int \\<Rightarrow... | [
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\"",
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition lower_tick where\n\"lower_tick P prc = Sup (... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_gross_grd_min | lemma clmm_quote_gross_grd_min:
assumes "clmm_dsc P"
and "nz_support (lq P) \<noteq> {}"
shows "quote_gross P (grd_min P) = 0" | \<lbrakk>clmm_dsc P; nz_support (lq P) \<noteq> {}\<rbrakk> \<Longrightarrow> quote_gross P (grd_min P) = 0 | \<lbrakk>H1 x_1; H2 (H3 x_1) \<noteq> H4\<rbrakk> \<Longrightarrow> H5 x_1 (H6 x_1) = H7 | [
"Groups.zero_class.zero",
"Grid_Information.grd_min",
"Grid_Information.quote_gross",
"Set.empty",
"Grid_Information.lq",
"CLMM_Misc.nz_support",
"CLMM_Description.clmm_dsc"
] | [
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a set",
"(int \\<Rightarrow> real)... | [
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition grd_min where\n \"grd_min P = idx_min_img (grd P) (lq P)\"",
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\"",
"abbreviation empty :: \"'a set\" (\\<open>{}\\<close>)\n where \"{} \\<equiv> ... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_gross_grd_min_le | lemma clmm_quote_gross_grd_min_le:
assumes "clmm_dsc P"
and "sqp \<le> grd_min P"
and "0 < sqp"
shows "quote_gross P sqp = 0" | \<lbrakk>clmm_dsc P; sqp \<le> grd_min P; 0 < sqp\<rbrakk> \<Longrightarrow> quote_gross P sqp = 0 | \<lbrakk>H1 x_1; x_2 \<le> H2 x_1; H3 < x_2\<rbrakk> \<Longrightarrow> H4 x_1 x_2 = H3 | [
"Grid_Information.quote_gross",
"Groups.zero_class.zero",
"Grid_Information.grd_min",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n... | [
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\"",
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition grd_min where\n \"grd_min P = idx_min_img (grd P) (lq P)\"",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_gross_mono | lemma clmm_quote_gross_mono:
assumes "clmm_dsc P"
shows "mono (quote_gross P)" | clmm_dsc P \<Longrightarrow> mono (quote_gross P) | H1 x_1 \<Longrightarrow> H2 (H3 x_1) | [
"Grid_Information.quote_gross",
"Fun.order_class.mono",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool"
] | [
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\"",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (finite_liq P) \\<and> (\\<forall>i. 0 \\<le> lq P i) \\<and>\n (\\<forall>i. 0 \\<le> fee P i) \\<and> (\\<forall>i. fee P i < 1... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_gross_pos | lemma clmm_quote_gross_pos:
assumes "clmm_dsc P"
shows "0 \<le> quote_gross P sqp" | clmm_dsc P \<Longrightarrow> 0 \<le> quote_gross P sqp | H1 x_1 \<Longrightarrow> H2 \<le> H3 x_1 x_2 | [
"Grid_Information.quote_gross",
"Groups.zero_class.zero",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool"
] | [
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\"",
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (finite_liq P) \\<and> (\\<forall>i. 0 \\<le> lq P i) \\<and>\n (\\<f... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_gross_reach_eq | lemma clmm_quote_gross_reach_eq:
assumes "clmm_dsc P"
and "nz_support (lq P) \<noteq> {}"
and "0 \<le> y"
and "y \<le> quote_gross P (grd_max P)"
shows "quote_gross P (quote_reach P y) = y" | \<lbrakk>clmm_dsc P; nz_support (lq P) \<noteq> {}; 0 \<le> y; y \<le> quote_gross P (grd_max P)\<rbrakk> \<Longrightarrow> quote_gross P (quote_reach P y) = y | \<lbrakk>H1 x_1; H2 (H3 x_1) \<noteq> H4; H5 \<le> x_2; x_2 \<le> H6 x_1 (H7 x_1)\<rbrakk> \<Longrightarrow> H6 x_1 (H8 x_1 x_2) = x_2 | [
"Grid_Information.quote_reach",
"Grid_Information.grd_max",
"Grid_Information.quote_gross",
"Groups.zero_class.zero",
"Set.empty",
"Grid_Information.lq",
"CLMM_Misc.nz_support",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<... | [
"definition quote_reach where\n\"quote_reach = (\\<lambda>P y. \n if y = 0 then (grd_min P) \n else Inf ((quote_gross P)-` {y}))\"",
"definition grd_max where\n \"grd_max P = idx_max_img (grd P) (lq P)\"",
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\"",
"cl... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_gross_sum | lemma clmm_quote_gross_sum:
assumes "clmm_dsc P"
and "0 < sqp"
and "L = gross_fct (lq P) (fee P)"
and "j = lower_tick P sqp"
shows "quote_gross P sqp =
L j * (sqp - grd P j) +
sum (\<lambda> i. L i * (grd P (i+1) - grd P i)) {i. L i \<noteq> 0 \<and> i < j}" | \<lbrakk>clmm_dsc P; 0 < sqp; L = gross_fct (lq P) (fee P); j = lower_tick P sqp\<rbrakk> \<Longrightarrow> quote_gross P sqp = L j * (sqp - grd P j) + (\<Sum>i | L i \<noteq> 0 \<and> i < j. L i * (grd P (i + 1) - grd P i)) | \<lbrakk>H1 x_1; H2 < x_2; x_3 = H3 (H4 x_1) (H5 x_1); x_4 = H6 x_1 x_2\<rbrakk> \<Longrightarrow> H7 x_1 x_2 = H8 (H9 (x_3 x_4) (H10 x_2 (H11 x_1 x_4))) (H12 (\<lambda>y_0. H9 (x_3 y_0) (H10 (H11 x_1 (H8 y_0 H13)) (H11 x_1 y_0))) (H14 (\<lambda>y_1. x_3 y_1 \<noteq> H2 \<and> y_1 < x_4))) | [
"Set.Collect",
"Groups.one_class.one",
"Groups_Big.comm_monoid_add_class.sum",
"Grid_Information.grd",
"Groups.minus_class.minus",
"Groups.times_class.times",
"Groups.plus_class.plus",
"Grid_Information.quote_gross",
"CLMM_Description.lower_tick",
"Grid_Information.fee",
"Grid_Information.lq",
... | [
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
... | [
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>-\\<close> 65)",
"class times =\n fixes times :: \"'a \\<Righ... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_net_grd_min | lemma clmm_quote_net_grd_min:
assumes "clmm_dsc P"
and "nz_support (lq P) \<noteq> {}"
shows "quote_net P (grd_min P) = 0" | \<lbrakk>clmm_dsc P; nz_support (lq P) \<noteq> {}\<rbrakk> \<Longrightarrow> quote_net P (grd_min P) = 0 | \<lbrakk>H1 x_1; H2 (H3 x_1) \<noteq> H4\<rbrakk> \<Longrightarrow> H5 x_1 (H6 x_1) = H7 | [
"Groups.zero_class.zero",
"Grid_Information.grd_min",
"Grid_Information.quote_net",
"Set.empty",
"Grid_Information.lq",
"CLMM_Misc.nz_support",
"CLMM_Description.clmm_dsc"
] | [
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a set",
"(int \\<Rightarrow> real)... | [
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition grd_min where\n \"grd_min P = idx_min_img (grd P) (lq P)\"",
"definition quote_net where\n\"quote_net P = gen_quote (grd P) (lq P)\"",
"abbreviation empty :: \"'a set\" (\\<open>{}\\<close>)\n where \"{} \\<equiv> bot\"",
"definition lq... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_net_mono | lemma clmm_quote_net_mono:
assumes "clmm_dsc P"
shows "mono (quote_net P)" | clmm_dsc P \<Longrightarrow> mono (quote_net P) | H1 x_1 \<Longrightarrow> H2 (H3 x_1) | [
"Grid_Information.quote_net",
"Fun.order_class.mono",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"('a \\<Rightarrow> 'b) \\<Rightarrow> bool",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> bool"
] | [
"definition quote_net where\n\"quote_net P = gen_quote (grd P) (lq P)\"",
"definition clmm_dsc where\n\"clmm_dsc P \\<longleftrightarrow> (span_grid P) \\<and> (finite_liq P) \\<and> (\\<forall>i. 0 \\<le> lq P i) \\<and>\n (\\<forall>i. 0 \\<le> fee P i) \\<and> (\\<forall>i. fee P i < 1)\""
] |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_net_sum | lemma clmm_quote_net_sum:
assumes "clmm_dsc P"
and "0 < sqp"
and "L = lq P"
and "j = lower_tick P sqp"
shows "quote_net P sqp =
L j * (sqp - grd P j) +
sum (\<lambda> i. L i * (grd P (i+1) - grd P i)) {i. L i \<noteq> 0 \<and> i < j}" | \<lbrakk>clmm_dsc P; 0 < sqp; L = lq P; j = lower_tick P sqp\<rbrakk> \<Longrightarrow> quote_net P sqp = L j * (sqp - grd P j) + (\<Sum>i | L i \<noteq> 0 \<and> i < j. L i * (grd P (i + 1) - grd P i)) | \<lbrakk>H1 x_1; H2 < x_2; x_3 = H3 x_1; x_4 = H4 x_1 x_2\<rbrakk> \<Longrightarrow> H5 x_1 x_2 = H6 (H7 (x_3 x_4) (H8 x_2 (H9 x_1 x_4))) (H10 (\<lambda>y_0. H7 (x_3 y_0) (H8 (H9 x_1 (H6 y_0 H11)) (H9 x_1 y_0))) (H12 (\<lambda>y_1. x_3 y_1 \<noteq> H2 \<and> y_1 < x_4))) | [
"Set.Collect",
"Groups.one_class.one",
"Groups_Big.comm_monoid_add_class.sum",
"Grid_Information.grd",
"Groups.minus_class.minus",
"Groups.times_class.times",
"Groups.plus_class.plus",
"Grid_Information.quote_net",
"CLMM_Description.lower_tick",
"Grid_Information.lq",
"Groups.zero_class.zero",
... | [
"('a \\<Rightarrow> bool) \\<Rightarrow> 'a set",
"'a",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'a set \\<Rightarrow> 'b",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
... | [
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>-\\<close> 65)",
"class times =\n fixes times :: \"'a \\<Righ... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_reach_ge | lemma clmm_quote_reach_ge:
assumes "clmm_dsc P"
and "nz_support (lq P) \<noteq> {}"
and "0 \<le> y"
and "y \<le> quote_gross P (grd_max P)"
shows "grd_min P \<le> (quote_reach P y)" | \<lbrakk>clmm_dsc P; nz_support (lq P) \<noteq> {}; 0 \<le> y; y \<le> quote_gross P (grd_max P)\<rbrakk> \<Longrightarrow> grd_min P \<le> quote_reach P y | \<lbrakk>H1 x_1; H2 (H3 x_1) \<noteq> H4; H5 \<le> x_2; x_2 \<le> H6 x_1 (H7 x_1)\<rbrakk> \<Longrightarrow> H8 x_1 \<le> H9 x_1 x_2 | [
"Grid_Information.quote_reach",
"Grid_Information.grd_min",
"Grid_Information.grd_max",
"Grid_Information.quote_gross",
"Groups.zero_class.zero",
"Set.empty",
"Grid_Information.lq",
"CLMM_Misc.nz_support",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<... | [
"definition quote_reach where\n\"quote_reach = (\\<lambda>P y. \n if y = 0 then (grd_min P) \n else Inf ((quote_gross P)-` {y}))\"",
"definition grd_min where\n \"grd_min P = idx_min_img (grd P) (lq P)\"",
"definition grd_max where\n \"grd_max P = idx_max_img (grd P) (lq P)\"",
"definition quote_gross whe... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_reach_grd_liq | lemma clmm_quote_reach_grd_liq:
assumes "clmm_dsc P"
and "nz_support (lq P) \<noteq> {}"
and "0 < y"
and "y \<le> quote_gross P (grd_max P)"
and "j = lower_tick P sqp"
and "grd P j = sqp"
and "sqp = quote_reach P y"
shows "lq P (j - 1) \<noteq> 0" | \<lbrakk>clmm_dsc P; nz_support (lq P) \<noteq> {}; 0 < y; y \<le> quote_gross P (grd_max P); j = lower_tick P sqp; grd P j = sqp; sqp = quote_reach P y\<rbrakk> \<Longrightarrow> lq P (j - 1) \<noteq> 0 | \<lbrakk>H1 x_1; H2 (H3 x_1) \<noteq> H4; H5 < x_2; x_2 \<le> H6 x_1 (H7 x_1); x_3 = H8 x_1 x_4; H9 x_1 x_3 = x_4; x_4 = H10 x_1 x_2\<rbrakk> \<Longrightarrow> H3 x_1 (H11 x_3 H12) \<noteq> H5 | [
"Groups.one_class.one",
"Groups.minus_class.minus",
"Grid_Information.quote_reach",
"Grid_Information.grd",
"CLMM_Description.lower_tick",
"Grid_Information.grd_max",
"Grid_Information.quote_gross",
"Groups.zero_class.zero",
"Set.empty",
"Grid_Information.lq",
"CLMM_Misc.nz_support",
"CLMM_Des... | [
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int... | [
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"class minus =\n fixes minus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>-\\<close> 65)",
"definition quote_reach where\n\"quote_reach = (\\<lambda>P y. \n if y = 0 then (grd_min P) \n else Inf ((quote_gross P)-` {y}))\"",
"definit... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_reach_le | lemma clmm_quote_reach_le:
assumes "clmm_dsc P"
and "nz_support (lq P) \<noteq> {}"
and "0 < y"
and "sqp \<in> quote_gross P -`{y}"
and "sqp' = quote_reach P y"
shows "sqp' \<le> sqp" | \<lbrakk>clmm_dsc P; nz_support (lq P) \<noteq> {}; 0 < y; sqp \<in> quote_gross P -` {y}; sqp' = quote_reach P y\<rbrakk> \<Longrightarrow> sqp' \<le> sqp | \<lbrakk>H1 x_1; H2 (H3 x_1) \<noteq> H4; H5 < x_2; x_3 \<in> H6 (H7 x_1) (H8 x_2 H4); x_4 = H9 x_1 x_2\<rbrakk> \<Longrightarrow> x_4 \<le> x_3 | [
"Grid_Information.quote_reach",
"Set.insert",
"Grid_Information.quote_gross",
"Set.vimage",
"Groups.zero_class.zero",
"Set.empty",
"Grid_Information.lq",
"CLMM_Misc.nz_support",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> rea... | [
"definition quote_reach where\n\"quote_reach = (\\<lambda>P y. \n if y = 0 then (grd_min P) \n else Inf ((quote_gross P)-` {y}))\"",
"definition insert :: \"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set\"\n where insert_compr: \"insert a B = {x. x = a \\<or> x \\<in> B}\"",
"definition quote_gross where\n\"... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_reach_mem | lemma clmm_quote_reach_mem:
assumes "clmm_dsc P"
and "0 \<le> y"
and "y \<le> quote_gross P (grd_max P)"
and "nz_support (lq P) \<noteq> {}"
shows "quote_reach P y \<in> quote_gross P-` {y}" | \<lbrakk>clmm_dsc P; 0 \<le> y; y \<le> quote_gross P (grd_max P); nz_support (lq P) \<noteq> {}\<rbrakk> \<Longrightarrow> quote_reach P y \<in> quote_gross P -` {y} | \<lbrakk>H1 x_1; H2 \<le> x_2; x_2 \<le> H3 x_1 (H4 x_1); H5 (H6 x_1) \<noteq> H7\<rbrakk> \<Longrightarrow> H8 x_1 x_2 \<in> H9 (H3 x_1) (H10 x_2 H7) | [
"Set.insert",
"Set.vimage",
"Grid_Information.quote_reach",
"Set.empty",
"Grid_Information.lq",
"CLMM_Misc.nz_support",
"Grid_Information.grd_max",
"Grid_Information.quote_gross",
"Groups.zero_class.zero",
"CLMM_Description.clmm_dsc"
] | [
"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set",
"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set \\<Rightarrow> 'a set",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a set",
"(int \\<Rightarrow> real) \\<times... | [
"definition insert :: \"'a \\<Rightarrow> 'a set \\<Rightarrow> 'a set\"\n where insert_compr: \"insert a B = {x. x = a \\<or> x \\<in> B}\"",
"definition vimage :: \"('a \\<Rightarrow> 'b) \\<Rightarrow> 'b set \\<Rightarrow> 'a set\" (infixr \\<open>-`\\<close> 90)\n where \"f -` B \\<equiv> {x. f x \\<in> B... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_reach_pos | lemma clmm_quote_reach_pos:
assumes "clmm_dsc P"
and "nz_support (lq P) \<noteq> {}"
and "0 \<le> y"
and "y \<le> quote_gross P (grd_max P)"
and "sqp = quote_reach P y"
shows "0 < sqp" | \<lbrakk>clmm_dsc P; nz_support (lq P) \<noteq> {}; 0 \<le> y; y \<le> quote_gross P (grd_max P); sqp = quote_reach P y\<rbrakk> \<Longrightarrow> 0 < sqp | \<lbrakk>H1 x_1; H2 (H3 x_1) \<noteq> H4; H5 \<le> x_2; x_2 \<le> H6 x_1 (H7 x_1); x_3 = H8 x_1 x_2\<rbrakk> \<Longrightarrow> H5 < x_3 | [
"Grid_Information.quote_reach",
"Grid_Information.grd_max",
"Grid_Information.quote_gross",
"Groups.zero_class.zero",
"Set.empty",
"Grid_Information.lq",
"CLMM_Misc.nz_support",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<... | [
"definition quote_reach where\n\"quote_reach = (\\<lambda>P y. \n if y = 0 then (grd_min P) \n else Inf ((quote_gross P)-` {y}))\"",
"definition grd_max where\n \"grd_max P = idx_max_img (grd P) (lq P)\"",
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\"",
"cl... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_quote_reach_zero | lemma clmm_quote_reach_zero:
assumes "clmm_dsc P"
and "nz_support (lq P) \<noteq> {}"
shows "quote_reach P 0 = grd_min P" | \<lbrakk>clmm_dsc P; nz_support (lq P) \<noteq> {}\<rbrakk> \<Longrightarrow> quote_reach P 0 = grd_min P | \<lbrakk>H1 x_1; H2 (H3 x_1) \<noteq> H4\<rbrakk> \<Longrightarrow> H5 x_1 H6 = H7 x_1 | [
"Grid_Information.grd_min",
"Groups.zero_class.zero",
"Grid_Information.quote_reach",
"Set.empty",
"Grid_Information.lq",
"CLMM_Misc.nz_support",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real",
"'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a set",
"(int \\<Rightarrow> real)... | [
"definition grd_min where\n \"grd_min P = idx_min_img (grd P) (lq P)\"",
"class zero =\n fixes zero :: 'a (\\<open>0\\<close>)",
"definition quote_reach where\n\"quote_reach = (\\<lambda>P y. \n if y = 0 then (grd_min P) \n else Inf ((quote_gross P)-` {y}))\"",
"abbreviation empty :: \"'a set\" (\\<open>... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_rng_quote_strict_pos | lemma clmm_rng_quote_strict_pos:
assumes "clmm_dsc P"
and "L = gross_fct (lq P) (fee P)"
and "L i \<noteq> 0"
shows "0 < L i * (grd P (i+1) - grd P i)" | \<lbrakk>clmm_dsc P; L = gross_fct (lq P) (fee P); L i \<noteq> 0\<rbrakk> \<Longrightarrow> 0 < L i * (grd P (i + 1) - grd P i) | \<lbrakk>H1 x_1; x_2 = H2 (H3 x_1) (H4 x_1); x_2 x_3 \<noteq> H5\<rbrakk> \<Longrightarrow> H5 < H6 (x_2 x_3) (H7 (H8 x_1 (H9 x_3 H10)) (H8 x_1 x_3)) | [
"Groups.one_class.one",
"Groups.plus_class.plus",
"Grid_Information.grd",
"Groups.minus_class.minus",
"Groups.times_class.times",
"Groups.zero_class.zero",
"Grid_Information.fee",
"Grid_Information.lq",
"CLMM_Misc.gross_fct",
"CLMM_Description.clmm_dsc"
] | [
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a",
"(int \\<Rightarrow> rea... | [
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>+\\<close> 65)",
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"class minus =\n fixes minus :: \"'a \\<Righta... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_sum_rng_quote_pos | lemma clmm_sum_rng_quote_pos:
assumes "clmm_dsc P"
and "L = gross_fct (lq P) (fee P)"
shows "0 \<le> sum (\<lambda> i. L i * (grd P (i+1) - grd P i)) M" | \<lbrakk>clmm_dsc P; L = gross_fct (lq P) (fee P)\<rbrakk> \<Longrightarrow> 0 \<le> (\<Sum>i\<in>M. L i * (grd P (i + 1) - grd P i)) | \<lbrakk>H1 x_1; x_2 = H2 (H3 x_1) (H4 x_1)\<rbrakk> \<Longrightarrow> H5 \<le> H6 (\<lambda>y_0. H7 (x_2 y_0) (H8 (H9 x_1 (H10 y_0 H11)) (H9 x_1 y_0))) x_3 | [
"Groups.one_class.one",
"Groups.plus_class.plus",
"Grid_Information.grd",
"Groups.minus_class.minus",
"Groups.times_class.times",
"Groups_Big.comm_monoid_add_class.sum",
"Groups.zero_class.zero",
"Grid_Information.fee",
"Grid_Information.lq",
"CLMM_Misc.gross_fct",
"CLMM_Description.clmm_dsc"
] | [
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Right... | [
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>+\\<close> 65)",
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"class minus =\n fixes minus :: \"'a \\<Righta... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.clmm_sum_rng_quote_strict_pos | lemma clmm_sum_rng_quote_strict_pos:
assumes "clmm_dsc P"
and "L = gross_fct (lq P) (fee P)"
and "L i \<noteq> 0"
and "i \<in> M"
and "finite M"
shows "0 < sum (\<lambda> i. L i * (grd P (i+1) - grd P i)) M" | \<lbrakk>clmm_dsc P; L = gross_fct (lq P) (fee P); L i \<noteq> 0; i \<in> M; finite M\<rbrakk> \<Longrightarrow> 0 < (\<Sum>i\<in>M. L i * (grd P (i + 1) - grd P i)) | \<lbrakk>H1 x_1; x_2 = H2 (H3 x_1) (H4 x_1); x_2 x_3 \<noteq> H5; x_3 \<in> x_4; H6 x_4\<rbrakk> \<Longrightarrow> H5 < H7 (\<lambda>y_0. H8 (x_2 y_0) (H9 (H10 x_1 (H11 y_0 H12)) (H10 x_1 y_0))) x_4 | [
"Groups.one_class.one",
"Groups.plus_class.plus",
"Grid_Information.grd",
"Groups.minus_class.minus",
"Groups.times_class.times",
"Groups_Big.comm_monoid_add_class.sum",
"Finite_Set.finite",
"Groups.zero_class.zero",
"Grid_Information.fee",
"Grid_Information.lq",
"CLMM_Misc.gross_fct",
"CLMM_D... | [
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> int \\<Rightarrow> real",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"('a \\<Rightarrow> 'b) \\<Right... | [
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"class plus =\n fixes plus :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>+\\<close> 65)",
"definition grd::\"grid_info \\<Rightarrow> (int\\<Rightarrow> real)\" where\n\"grd P = fst P\"",
"class minus =\n fixes minus :: \"'a \\<Righta... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.cst_fee_base_gross_net | lemma cst_fee_base_gross_net:
assumes "clmm_dsc P"
and "\<And>i. fee P i = phi"
and "0 < sqp"
and "sqp \<le> sqp'"
shows "base_net P sqp - base_net P sqp' =
(1 - phi) * (base_gross P sqp - base_gross P sqp')" | \<lbrakk>clmm_dsc P; \<And>i. fee P i = phi; 0 < sqp; sqp \<le> sqp'\<rbrakk> \<Longrightarrow> base_net P sqp - base_net P sqp' = (1 - phi) * (base_gross P sqp - base_gross P sqp') | \<lbrakk>H1 x_1; \<And>y_0. H2 x_1 y_0 = x_2; H3 < x_3; x_3 \<le> x_4\<rbrakk> \<Longrightarrow> H4 (H5 x_1 x_3) (H5 x_1 x_4) = H6 (H4 H7 x_2) (H4 (H8 x_1 x_3) (H8 x_1 x_4)) | [
"Grid_Information.base_gross",
"Groups.one_class.one",
"Groups.times_class.times",
"Grid_Information.base_net",
"Groups.minus_class.minus",
"Groups.zero_class.zero",
"Grid_Information.fee",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> rea... | [
"definition base_gross where\n\"base_gross P = gen_base (grd P) (gross_fct (lq P) (fee P))\"",
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>*\\<close> 70)",
"definition base_net where\n\"base_net P = gen_b... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.cst_fee_base_gross_net_tick_eq | lemma cst_fee_base_gross_net_tick_eq:
assumes "clmm_dsc P"
and "\<And>i. fee P i = phi"
and "j = lower_tick P sqp"
and "j = lower_tick P sqp'"
and "0 < sqp"
and "sqp \<le> sqp'"
shows "base_net P sqp - base_net P sqp' =
(1 - phi) * (base_gross P sqp - base_gross P sqp')" | \<lbrakk>clmm_dsc P; \<And>i. fee P i = phi; j = lower_tick P sqp; j = lower_tick P sqp'; 0 < sqp; sqp \<le> sqp'\<rbrakk> \<Longrightarrow> base_net P sqp - base_net P sqp' = (1 - phi) * (base_gross P sqp - base_gross P sqp') | \<lbrakk>H1 x_1; \<And>y_0. H2 x_1 y_0 = x_2; x_3 = H3 x_1 x_4; x_3 = H3 x_1 x_5; H4 < x_4; x_4 \<le> x_5\<rbrakk> \<Longrightarrow> H5 (H6 x_1 x_4) (H6 x_1 x_5) = H7 (H5 H8 x_2) (H5 (H9 x_1 x_4) (H9 x_1 x_5)) | [
"Grid_Information.base_gross",
"Groups.one_class.one",
"Groups.times_class.times",
"Grid_Information.base_net",
"Groups.minus_class.minus",
"Groups.zero_class.zero",
"CLMM_Description.lower_tick",
"Grid_Information.fee",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> rea... | [
"definition base_gross where\n\"base_gross P = gen_base (grd P) (gross_fct (lq P) (fee P))\"",
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>*\\<close> 70)",
"definition base_net where\n\"base_net P = gen_b... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.cst_fee_base_gross_net_tick_lt | lemma cst_fee_base_gross_net_tick_lt:
assumes "clmm_dsc P"
and "\<And>i. fee P i = phi"
and "j = lower_tick P sqp"
and "k = lower_tick P sqp'"
and "0 < sqp"
and "sqp \<le> sqp'"
and "j < k"
shows "base_net P sqp - base_net P sqp' =
(1 - phi) * (base_gross P sqp - base_gross P sqp')" | \<lbrakk>clmm_dsc P; \<And>i. fee P i = phi; j = lower_tick P sqp; k = lower_tick P sqp'; 0 < sqp; sqp \<le> sqp'; j < k\<rbrakk> \<Longrightarrow> base_net P sqp - base_net P sqp' = (1 - phi) * (base_gross P sqp - base_gross P sqp') | \<lbrakk>H1 x_1; \<And>y_0. H2 x_1 y_0 = x_2; x_3 = H3 x_1 x_4; x_5 = H3 x_1 x_6; H4 < x_4; x_4 \<le> x_6; x_3 < x_5\<rbrakk> \<Longrightarrow> H5 (H6 x_1 x_4) (H6 x_1 x_6) = H7 (H5 H8 x_2) (H5 (H9 x_1 x_4) (H9 x_1 x_6)) | [
"Grid_Information.base_gross",
"Groups.one_class.one",
"Groups.times_class.times",
"Grid_Information.base_net",
"Groups.minus_class.minus",
"Groups.zero_class.zero",
"CLMM_Description.lower_tick",
"Grid_Information.fee",
"CLMM_Description.clmm_dsc"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"'a",
"'a \\<Rightarrow> 'a \\<Rightarrow> 'a",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> rea... | [
"definition base_gross where\n\"base_gross P = gen_base (grd P) (gross_fct (lq P) (fee P))\"",
"class one =\n fixes one :: 'a (\\<open>1\\<close>)",
"class times =\n fixes times :: \"'a \\<Rightarrow> 'a \\<Rightarrow> 'a\" (infixl \\<open>*\\<close> 70)",
"definition base_net where\n\"base_net P = gen_b... |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.finer_clmm.finer_base_gross_eq | lemma finer_base_gross_eq:
shows "base_gross P1 = base_gross P2" | finer_clmm P1.0 P2.0 \<Longrightarrow> base_gross P1.0 = base_gross P2.0 | H1 x_1 x_2 \<Longrightarrow> H2 x_1 = H2 x_2 | [
"Grid_Information.base_gross",
"CLMM_Description.finer_clmm"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> (int \\<Rightarrow> real) \\<times>\n (int... | [
"definition base_gross where\n\"base_gross P = gen_base (grd P) (gross_fct (lq P) (fee P))\""
] |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.finer_clmm.finer_base_net_eq | lemma finer_base_net_eq:
shows "base_net P1 = base_net P2" | finer_clmm P1.0 P2.0 \<Longrightarrow> base_net P1.0 = base_net P2.0 | H1 x_1 x_2 \<Longrightarrow> H2 x_1 = H2 x_2 | [
"Grid_Information.base_net",
"CLMM_Description.finer_clmm"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> (int \\<Rightarrow> real) \\<times>\n (int... | [
"definition base_net where\n\"base_net P = gen_base (grd P) (lq P)\""
] |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.finer_clmm.finer_mkt_depth | lemma finer_mkt_depth:
shows "mkt_depth P1 = mkt_depth P2" | finer_clmm P1.0 P2.0 \<Longrightarrow> mkt_depth P1.0 = mkt_depth P2.0 | H1 x_1 x_2 \<Longrightarrow> H2 x_1 = H2 x_2 | [
"Grid_Information.mkt_depth",
"CLMM_Description.finer_clmm"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> (int \\<Rightarrow> real) \\<times>... | [
"definition mkt_depth where\n\"mkt_depth P = (\\<lambda> pi pi'. if pi < pi' then (base_net P pi - base_net P pi')\n else (quote_net P pi - quote_net P pi'))\""
] |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.finer_clmm.finer_quote_gross_eq | lemma finer_quote_gross_eq:
shows "quote_gross P1 = quote_gross P2" | finer_clmm P1.0 P2.0 \<Longrightarrow> quote_gross P1.0 = quote_gross P2.0 | H1 x_1 x_2 \<Longrightarrow> H2 x_1 = H2 x_2 | [
"Grid_Information.quote_gross",
"CLMM_Description.finer_clmm"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> (int \\<Rightarrow> real) \\<times>\n (int... | [
"definition quote_gross where\n\"quote_gross P = gen_quote (grd P) (gross_fct (lq P) (fee P))\""
] |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.finer_clmm.finer_quote_net_eq | lemma finer_quote_net_eq:
shows "quote_net P1 = quote_net P2" | finer_clmm P1.0 P2.0 \<Longrightarrow> quote_net P1.0 = quote_net P2.0 | H1 x_1 x_2 \<Longrightarrow> H2 x_1 = H2 x_2 | [
"Grid_Information.quote_net",
"CLMM_Description.finer_clmm"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> real \\<Rightarrow> real",
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> (int \\<Rightarrow> real) \\<times>\n (int... | [
"definition quote_net where\n\"quote_net P = gen_quote (grd P) (lq P)\""
] |
Concentrated_Liquidity_Market_Making_Operations/CLMM_Description | CLMM_Description.finer_clmm_ne.abs_finer_idx_max_coarse | lemma abs_finer_idx_max_coarse:
assumes "clmm_dsc P1"
and "clmm_dsc P2"
and "finer_pool P1 P2"
and "nz_support (lq P1) \<noteq> {}"
and "i1 = idx_max (lq P1)"
and "k2 = pool_coarse_idx P1 P2 i1"
shows "k2 = idx_max (lq P2)" | \<lbrakk>finer_clmm_ne P1.0 P2.0; clmm_dsc P1.0; clmm_dsc P2.0; finer_pool P1.0 P2.0; nz_support (lq P1.0) \<noteq> {}; i1.0 = idx_max (lq P1.0); k2.0 = pool_coarse_idx P1.0 P2.0 i1.0\<rbrakk> \<Longrightarrow> k2.0 = idx_max (lq P2.0) | \<lbrakk>H1 x_1 x_2; H2 x_1; H2 x_2; H3 x_1 x_2; H4 (H5 x_1) \<noteq> H6; x_3 = H7 (H5 x_1); x_4 = H8 x_1 x_2 x_3\<rbrakk> \<Longrightarrow> x_4 = H7 (H5 x_2) | [
"Grid_Information.pool_coarse_idx",
"CLMM_Misc.idx_max",
"Set.empty",
"Grid_Information.lq",
"CLMM_Misc.nz_support",
"Grid_Information.finer_pool",
"CLMM_Description.clmm_dsc",
"CLMM_Description.finer_clmm_ne"
] | [
"(int \\<Rightarrow> real) \\<times>\n(int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n\\<Rightarrow> (int \\<Rightarrow> real) \\<times>\n (int \\<Rightarrow> real) \\<times> (int \\<Rightarrow> real)\n \\<Rightarrow> int \\<Rightarrow> int",
"('a \\<Rightarrow> 'b) \\<Rig... | [
"definition pool_coarse_idx where\n\"pool_coarse_idx = (\\<lambda>P1 P2 i. coarse_idx (grd P1) (grd P2) i)\"",
"definition idx_max where\n\"idx_max f = Sup (nz_support f)\"",
"abbreviation empty :: \"'a set\" (\\<open>{}\\<close>)\n where \"{} \\<equiv> bot\"",
"definition lq::\"grid_info \\<Rightarrow> (int... |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 40