def test_inequality_sequence(self): natural = r"$\left|a_n - b_n \right| \leq n$" lean = r"|a n - b n| ≤ n" context = Context() context.add("a", "sequence") context.add("b", "sequence") test_bijective(self, Inequality, natural, lean, context)
def test_basic(self): natural = r"$a_n \leq b_n$ by H1 with n" lean = "have A1 : a n ≤ b n := H1 n" context = Context() context.add("a", "sequence") context.add("b", "sequence") test_bijective(self, BySentenceWith, natural, lean, context)
def test_sequence(self): nat = r"$a_n \leq b_n$" lean = "a n ≤ b n" context = Context() context.add("a", "sequence") context.add("b", "sequence") test_bijective(self, Inequality, nat, lean, context)
def test_sequence(self): natural = r"$\left|a_n - b_n \right|$" lean = "|a n - b n|" context = Context() context.add("a", "sequence") context.add("b", "sequence") test_bijective(self, AbsoluteDiff, natural, lean, context)
def test_basic(self): natural = "Let $n$" lean = "intros n A1" context = Context() context.current_goal = ForAllNatIneqThen( "n", Inequality.from_natural(r"$n \leq N$"), r"|b_n - l| < \epsilon$") test_bijective(self, LetNInequality, natural, lean, context)
def test_basic(self): context = Context() RealValuedSequences.from_natural("$a_n, b_n, c_n$ are real-valued", context) RealDeclaration.from_natural(r"$l \in \mathbb{R}$", context) SequenceLimit.from_natural(r"$a_n \rightarrow l$", context) context.current_goal = SequenceLimit.from_natural( r"$b_n \rightarrow l$", context) LetGoalLimit.from_natural(r"Let $\epsilon$", context) natural = r"Let's choose $N_a$ such that H1 uses $\epsilon$" lean = r"cases H1 ε A1 with N_a A2" test_bijective(self, ChooseNEpsilonLimit, natural, lean, context)
def test_basic(self): nat_gt = "$a > b$" lean_gt = "a > b" test_bijective(self, Inequality, nat_gt, lean_gt) nat_ge = r"$a \geq b$" lean_ge = "a ≥ b" test_bijective(self, Inequality, nat_ge, lean_ge) nat_lt = "$a < b$" lean_lt = "a < b" test_bijective(self, Inequality, nat_lt, lean_lt) nat_le = r"$a \leq b$" lean_le = "a ≤ b" test_bijective(self, Inequality, nat_le, lean_le)
def test_inequality(self): natural = r"$\forall x : x < a$" lean = "∀ x, x < a" test_bijective(self, ForAll, natural, lean)
def test_basic(self): natural = "Let's separate H1" lean = "cases H1" test_bijective(self, Cases, natural, lean)
def test_basic(self): natural = r"$a_n \rightarrow l$" lean = "is_limit a l" test_bijective(self, SequenceLimit, natural, lean)
def test_basic(self): natural = r"$l \in \mathbb{R}$" lean = "l : ℝ" test_bijective(self, RealDeclaration, natural, lean)
def test_basic(self): natural = "$a_n, b_n, c_n$ are real-valued sequences" lean = "a b c : ℕ → ℝ" test_bijective(self, RealValuedSequences, natural, lean)
def test_basic(self): natural = "Let's split the goal and do on all subgoals" lean = "split;" test_bijective(self, DoAllSubgoals, natural, lean)
def test_inequality(self): natural = r"$\left|a - b \right| \leq n$" lean = "|a - b| ≤ n" test_bijective(self, Inequality, natural, lean)
def test_basic(self): natural = "We claim $N$ works" lean = "use N" test_bijective(self, Use, natural, lean)
def test_basic(self): natural = "Let $N = \\max\\left(N_a, N_c\\right)$" lean = "let N := max N_a N_c" test_bijective(self, LetMax, natural, lean)
def test_basic(self): context = Context() natural = r"Let $\epsilon$" lean = "intros ε A1" context.current_goal = SequenceLimit("b", "l") test_bijective(self, LetGoalLimit, natural, lean, context)
def test_basic(self): natural = "By linear arithmetic" lean = "linarith" test_bijective(self, LinearArithmetic, natural, lean)
def test_basic(self): natural = r"$\left|a - b \right|$" lean = "|a - b|" test_bijective(self, AbsoluteDiff, natural, lean)
def test_basic(self): natural = "Let's use absolute value inequality property on H1 H2 and on goal" lean = "rw abs_sub_lt_iff at H1 H2 ⊢" test_bijective(self, AbsoluteValueIneqProperty, natural, lean)
def test_absdiff(self): natural = r"$\left|a_n - l \right| < \epsilon$ by H1 with H2" lean = "have A1 : |a n - l| < ε := H1 H2" context = Context() context.add("a", "sequence") test_bijective(self, BySentenceWith, natural, lean, context)
def test_basic(self): natural = "Let's split the goal" lean = "split" test_bijective(self, SplitGoal, natural, lean)
def test_basic(self): natural = r"By inequality properties, $N_a \leq N$" lean = r"have A1 : N_a ≤ N := by obvious_ineq" test_bijective(self, ByInequalityProperties, natural, lean)
def test_basic(self): natural = "Let's choose n in H1" lean = "have A1 := H1 n" test_bijective(self, LetsChooseIn, natural, lean)