text
stringlengths
0
3.34M
lemma example2 (x y : mynat) (h : y = x + 7) : 2 * y = 2 * (x + 7) := begin rw ← h, refl, end
[GOAL] ⊢ DecidableRel fun x x_1 => x < x_1 [PROOFSTEP] simp only [LT'] [GOAL] ⊢ DecidableRel fun s₁ s₂ => ltb (iter s₁) (iter s₂) = true [PROOFSTEP] infer_instance -- short-circuit type class inference [GOAL] c : Char cs₁ cs₂ : List Char i₁ i₂ : Pos ⊢ ltb { s := { data := c :: cs₁ }, i := i₁ + c } { s := { data := c ...
informal statement If $G$ is a group and $a, x \in G$, prove that $C\left(x^{-1} a x\right)=x^{-1} C(a) x$formal statement theorem exercise_2_4_36 {a n : ℕ} (h : a > 1) : n ∣ (a ^ n - 1).totient :=
[GOAL] a b : ℕ ⊢ a ≠ b ↔ ↑a ≠ ↑b [PROOFSTEP] simp only [ne_eq, Int.cast_eq_cast_iff_Nat]
universes v /- matcher for the following patterns ``` | "hello" => _ | "world" => _ | a => _ ``` -/ def matchString (C : String → Sort v) (s : String) (h₁ : Unit → C "hello") (h₂ : Unit → C "world") (h₃ : ∀ s, C s) : C s := dite (s = "hello") (fun h => @Eq.ndrec _ _ (fun x => C x) (h₁ ()) _ h....
import data.real.basic theorem challenge3 : (2 : ℝ) + 2 ≠ 5 := begin norm_num end
informal statement Let $X$ be a topological space and let $Y$ be a metric space. Let $f_{n}: X \rightarrow Y$ be a sequence of continuous functions. Let $x_{n}$ be a sequence of points of $X$ converging to $x$. Show that if the sequence $\left(f_{n}\right)$ converges uniformly to $f$, then $\left(f_{n}\left(x_{n}\right...
import analysis.real tactic.norm_num algebra.group_power theorem Q5a1 (S : set ℝ) : (∃ x : ℝ, x ∈ lower_bounds S) ↔ (∃ y : ℝ, y ∈ upper_bounds {t : ℝ | ∃ s ∈ S, t = -s }) := sorry theorem Q5a2 (S : set ℝ) (x : ℝ) : is_glb S x ↔ is_lub {t : ℝ | ∃ s ∈ S, t = -s} (-x) := sorry lemma Q5bhelper (S : set ℝ) (x₁ ...
import data.real.basic lemma mp (p q : Prop) : p → (p → q) → q := λ hp hpq, hpq hp
informal statement Show that the subgroup of all rotations in a dihedral group is a maximal subgroup.formal statement theorem exercise_3_1_3a {A : Type*} [comm_group A] (B : subgroup A) : ∀ a b : A ⧸ B, a*b = b*a :=
informal statement Prove that characteristic subgroups are normal.formal statement theorem exercise_4_4_6a {G : Type*} [group G] (H : subgroup G) [subgroup.characteristic H] : subgroup.normal H :=
import group_theory.subgroup theorem cpge_groupe_9_a {G1 : Type*} [group G1] {G2 : Type*} [group G2] (f : G1 →* G2) : ∀ (a : G1), ( (f a = 1) → (∀ (x : G1), f (x * a * x⁻¹) = 1)) := sorry
informal statement Prove that if an integer is the sum of two rational squares, then it is the sum of two integer squares.formal statement theorem exercise_8_3_6a {R : Type*} [ring R] (hR : R = (gaussian_int ⧸ ideal.span ({⟨0, 1⟩} : set gaussian_int))) : is_field R ∧ ∃ finR : fintype R, @card R finR = 2 :=
import data.real.basic tactic.ring tactic.tidy /- Definitions -/ definition double (n : ℕ) : ℕ := n + n #check double #check double ∘ double definition quadruple : ℕ → ℕ := double ∘ double definition FLT : Prop := ∀ n > 2, ∀ x y z, x^n + y^n = z^n → (x = 0 ∨ y = 0) theorem Wiles : FLT := begin unfold FLT, in...
import linear_algebra.basic universes u v w x variables {R : Type u} [ring R] variables {M₁ : Type v} [add_comm_group M₁] [module R M₁] variables {M₂ : Type w} [add_comm_group M₂] [module R M₂] variables {M₃ : Type x} [add_comm_group M₃] [module R M₃] open linear_map open submodule lemma linear_map.ker_le_range_iff...
-- Andreas, 2017-01-14, issue #2405 reported by m0davis -- Instance not found due to regression introduced by -- parameter-refinement. -- {-# OPTIONS --show-implicit #-} -- {-# OPTIONS -v tc.instance:70 #-} -- {-# OPTIONS -v tc.meta.assign:40 #-} -- {-# OPTIONS -v tc.conv:40 #-} -- {-# OPTIONS -v tc.sig.param:100 #-} ...
/- Copyright (c) 2021 Yourong Zang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yourong Zang -/ import analysis.calculus.conformal.normed_space import analysis.inner_product_space.conformal_linear_map /-! # Conformal maps between inner product spaces A function be...
opaque f : Nat → Nat opaque g : Nat → Nat namespace Foo @[scoped simp] axiom ax1 (x : Nat) : f (g x) = x @[scoped simp] axiom ax2 (x : Nat) : g (g x) = g x end Foo theorem ex1 : f (g (g (g x))) = x := by simp -- does not use ax1 and ax2 simp [Foo.ax1, Foo.ax2] theorem ex2 : f (g (g (g x))) = x := have h₁ : f...
theorem ex1 (p q r : Prop) (h1 : p ∨ q) (h2 : p → q) : q := by theorem ex2 (p q r : Prop) (h1 : p ∨ q) (h2 : p → q) : q := by cases h1 case inl =>
[STATEMENT] lemma ensures_simple: "\<lbrakk> \<turnstile> $P \<and> N \<longrightarrow> P` \<or> Q`; \<turnstile> ($P \<and> N) \<and> A \<longrightarrow> Q` \<rbrakk> \<Longrightarrow> \<turnstile> \<box>N \<and> \<box>\<diamond>A \<longrightarrow> (P \<leadsto> Q)" [PROOF STATE] proof (prove) goal (1 subgo...
import data.real.basic import data.polynomial.basic import data.polynomial.ring_division import data.complex.basic theorem USAMO_Problem_3_1977 (a b : ℂ): (a ∈ polynomial.roots ((polynomial.monomial 4 (1:ℂ ) ) + (polynomial.monomial 3 (1:ℂ) ) - 1) ∧ b ∈ polynomial.roots ((polynomial.monomial 4 (1:ℂ) ) + (polynomial....
example : ∃ a : ℕ, 5 = a := begin apply exists.intro, reflexivity end
/- Copyright (c) 2022 Michael Stoll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Stoll ! This file was ported from Lean 3 source module data.fin.tuple.bubble_sort_induction ! leanprover-community/mathlib commit 50832daea47b195a48b5b33b1c8b2162c48c3afc ! Ple...
informal statement Let $H \leq K \leq G$. Prove that $|G: H|=|G: K| \cdot|K: H|$ (do not assume $G$ is finite).formal statement theorem exercise_3_2_11 {G : Type*} [group G] {H K : subgroup G} (hHK : H ≤ K) : H.index = K.index * H.relindex K :=
universe u variable {α : Type u} def split : List α → List α × List α | [] => ([], []) | [a] => ([a], []) | a::b::as => (a :: (split as).1, b :: (split as).2) theorem ex1 : split [1, 2, 3, 4, 5] = ([1, 3, 5], [2, 4]) := rfl
{-# OPTIONS --erased-cubical #-} module Erased-cubical-Open-public.Erased (_ : Set₁) where postulate A : Set
theory Scratch imports Main begin lemma "1=1" by simp end
universes u v inductive Vec2 (α : Type u) (β : Type v) : Nat → Type (max u v) | nil : Vec2 α β 0 | cons : α → β → forall {n}, Vec2 α β n → Vec2 α β (n+1) inductive Fin2 : Nat → Type | zero (n : Nat) : Fin2 (n+1) | succ {n : Nat} (s : Fin2 n) : Fin2 (n+1) theorem test1 {α β} {n} (a₁ a₂ : α) (b₁ b₂ : β) ...
def f (a : Array Nat) (i : Nat) (v : Nat) (h : i < a.size) : Array Nat := a.set ⟨i, h⟩ (a.get ⟨i, h⟩ + v) set_option pp.proofs true theorem ex1 (h₃ : i = j) : f a i (0 + v) h₁ = f a j v h₂ := by simp trace_state simp [h₃] theorem ex2 (h₃ : i = j) : f a (0 + i) (0 + v) h₁ = f a j v h₂ := by simp trace_sta...
@[simp] theorem liftOn_mk (a : α) (f : α → γ) (h : ∀ a₁ a₂, r a₁ a₂ → f a₁ = f a₂) : Quot.liftOn (Quot.mk r a) f h = f a := rfl theorem eq_iff_true_of_subsingleton [Subsingleton α] (x y : α) : x = y ↔ True := iff_true _ ▸ Subsingleton.elim .. section attribute [simp] eq_iff_true_of_subsingleton end @[simp] the...
section {* \isaheader{Generic Compare Algorithms} *} theory Gen_Comp imports "../Intf/Intf_Comp" "../../../Automatic_Refinement/Automatic_Refinement" begin subsection {* Order for Product *} (* TODO: Optimization? Or only go via prod_cmp? *) lemma autoref_prod_cmp_dflt_id[autoref_rules_raw]: "(dflt_cmp op \<l...
-- /- This example demonstratea that when we are using `nativeDecide`, we are also trusting the correctness of `implementedBy` annotations, foreign functions (i.e., `[extern]` annotations), etc. -/ def g (b : Bool) := false /- The following `implementedBy` is telling the compiler "trust me, `g` does implement `f`" wh...
[GOAL] ⊢ DivisionRing ℚ [PROOFSTEP] infer_instance
informal statement Show that there are infinitely many primes congruent to $-1$ modulo 6 .formal statement theorem exercise_3_1 : infinite {p : primes // p ≡ -1 [ZMOD 6]} :=
/-| Hello World! -/ #print "Hello World!" /-| A literate comment! -/ theorem exampleTheorem (p q : Prop) (hp : p) (hq : q) : p ∧ q ∧ p := by apply And.intro . exact hp . sorry
class Preorder (α : Type u) extends LE α where le_refl (a : α) : a ≤ a le_trans {a b c : α} : a ≤ b → b ≤ c → a ≤ c instance {α : Type u} {β : α → Type v} [(a : α) → Preorder (β a)] : Preorder ((a : α) → β a) where le f g := ∀ a, f a ≤ g a le_refl f := fun a => Preorder.le_refl (f a) le_trans := fun h₁ h...
From stdpp Require Import base tactics. (** Test parsing of variants of [(≡)] notation. *) Lemma test_equiv_annot_sections `{!Equiv A, !Equivalence (≡@{A})} (x : A) : x ≡@{A} x ∧ (≡@{A}) x x ∧ (x ≡.) x ∧ (.≡ x) x ∧ ((x ≡@{A} x)) ∧ ((≡@{A})) x x ∧ ((x ≡.)) x ∧ ((.≡ x)) x ∧ ( x ≡@{A} x) ∧ ( x ≡.) x ∧ (x ≡@{A} x ...
import LeanCodePrompts.FirstTacticFinder import Mathlib.Tactic.Basic import Mathlib.Tactic.Use import Mathlib -- example : ∀ n : ℕ, ∃ m : ℕ, n < 2 * m + 1 := by -- repeat (aide_lookahead) -- repeat (sorry) set_option trace.Translate.info true example : ∀ n : ℕ, ∃ m : ℕ, n < 2 * m + 1 := by show_tactic_prompt ...
informal statement Show that if $X$ is normal, every pair of disjoint closed sets have neighborhoods whose closures are disjoint.formal statement theorem exercise_32_1 {X : Type*} [topological_space X] (hX : normal_space X) (A : set X) (hA : is_closed A) : normal_space {x // x ∈ A} :=
theorem P_implies_P (P : Prop) : P → P := begin intro HP, exact HP end
import Mathlib.Data.Nat.Basic theorem rangeDecompose (start mid stop : ℕ) (hs : start ≤ mid ∧ mid ≤ stop) {f : ℕ → β → Id (ForInStep β)} : STD.forIn (mkRange' start stop) init f = STD.forIn (mkRange' mid stop) (Id.run (STD.forIn (mkRange' start mid) init f)) f := by sorry
import help data.nat.prime open nat theorem Euclid (n : ℕ) : ∃ p ≥ n, prime p := begin let N := n.fact + 1, let p := min_fac N, use_this p, have p_is_prime : prime p := min_fac_prime _, split, show p ≥ n, by_contradiction, have key_fact : p ∣ n.fact := dvd_fact _ _, have oops : p ∣ 1, all_...
lemma lt_aux_one (a b : mynat) : a ≤ b ∧ ¬ (b ≤ a) → succ a ≤ b := begin intro h, cases h with h1 h2, cases h1 with c h1, cases c, rw add_zero at h1, rw h1 at h2, exfalso, exact h2 (le_refl a), rwa [h1, add_succ], apply succ_le_succ, use c, refl, end
(* Title: HOL/ex/PresburgerEx.thy Author: Amine Chaieb, TU Muenchen *) section {* Some examples for Presburger Arithmetic *} theory PresburgerEx imports Presburger begin lemma "\<And>m n ja ia. \<lbrakk>\<not> m \<le> j; \<not> (n::nat) \<le> i; (e::nat) \<noteq> 0; Suc j \<le> ja\<rbrakk> \<Longrighta...
informal statement Show that any subgroup of order $p^{n-1}$ in a group $G$ of order $p^n$ is normal in $G$.formal statement theorem exercise_4_1_19 : infinite {x : quaternion ℝ | x^2 = -1} :=
import tactic variable X : Type theorem reflexive_of_symmetric_transitive_and_connected (r : X → X → Prop) (h_symm : ∀ x y : X, r x y → r y x) (h_trans : ∀ x y z : X, r x y → r y z → r x z) (h_connected : ∀ x, ∃ y, r x y) : (∀ x : X, r x x) := begin sorry, end
module Main mutual %inline is_even : Int -> Int is_even n = if n == 0 then 1 else is_odd $ n-1 is_odd : Int -> Int is_odd n = if n == 0 then 0 else is_even $ n-1 main : JS_IO () main = do putStr' $ show $ is_even 100001
informal statement Define $\wedge(n)=\log p$ if $n$ is a power of $p$ and zero otherwise. Prove that $\sum_{A \mid n} \mu(n / d) \log d$ $=\wedge(n)$.formal statement theorem exercise_3_1 : infinite {p : primes // p ≡ -1 [ZMOD 6]} :=
lemma contrapositive2 (P Q : Prop) : (¬ Q → ¬ P) → (P → Q) := begin by_cases p : P; by_cases q : Q, intros h p2, exact q, repeat { tauto! }, end
informal statement If $C_{0}+\frac{C_{1}}{2}+\cdots+\frac{C_{n-1}}{n}+\frac{C_{n}}{n+1}=0,$ where $C_{0}, \ldots, C_{n}$ are real constants, prove that the equation $C_{0}+C_{1} x+\cdots+C_{n-1} x^{n-1}+C_{n} x^{n}=0$ has at least one real root between 0 and 1.formal statement theorem exercise_5_6 {f : ℝ → ℝ} (hf1 ...
theorem tst0 (x : Nat) : x + 0 = x + 0 := by { generalize x + 0 = y; exact (Eq.refl y) } theorem tst1 (x : Nat) : x + 0 = x + 0 := by { generalize h : x + 0 = y; exact (Eq.refl y) } theorem tst2 (x y w : Nat) (h : y = w) : (x + x) + w = (x + x) + y := by { generalize h' : x + x = z; subst y; exact Eq...
open import Relation.Binary.Core module TreeSort.Impl2.Correctness.Order {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) (trans≤ : Transitive _≤_) where open import BBSTree _≤_ open import BBSTree.Properties _≤_ trans≤ open import Data.List open import Functi...
abbrev M := ExceptT String <| StateT Nat Id def f (xs : List Nat) : M Unit := do for x in xs do if x == 0 then throw "contains zero" #eval f [1, 2, 3] |>.run' 0 #eval f [1, 0, 3] |>.run' 0 theorem ex1 : (f [1, 2, 3] |>.run' 0) = Except.ok () := rfl theorem ex2 : (f [1, 0, 3] |>.run' 0) = Except.error "contain...
lemma zero_le (a : mynat) : 0 ≤ a := begin rw le_iff_exists_add, use a, rwa zero_add, end
/- # Advanced proposition world. ## Level 3: and_trans. -/ /- Lemma If $P$, $Q$ and $R$ are true/false statements, then $P\land Q$ and $Q\land R$ together imply $P\land R$. -/ lemma and_trans (P Q R : Prop) : P ∧ Q → Q ∧ R → P ∧ R := begin intro hpq, intro hqr, cases hpq with p q, cases hqr with q' r, sp...
informal statement Show that $\int_0^1 \log(\sin \pi x) dx = - \log 2$.formal statement theorem exercise_3_9 : ∫ x in 0..1, real.log (real.sin (real.pi * x)) = - real.log 2 :=
module ModusPonens where modusPonens : ∀ {P Q : Set} → (P → Q) → P → Q modusPonens x = x
[STATEMENT] lemma HIm_nth [simp]: "HIm x $ 1 = Im1 x" "HIm x $ 2 = Im2 x" "HIm x $ 3 = Im3 x" "HIm x $ 4 = Im4 x" "HIm x $ 5 = Im5 x" "HIm x $ 6 = Im6 x" "HIm x $ 7 = Im7 x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (HIm x $ 1 = Im1 x &&& HIm x $ 2 = Im2 x &&& HIm x $ 3 = Im3 x) &&& (HIm x $ 4 = Im4 x &&& ...
/- Copyright (c) 2021 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kunhao Zheng, Stanislas Polu, David Renshaw, OpenAI GPT-f -/ import mathzoo.imports.miniF2F open_locale nat rat real big_operators topological_space /-- Suppose that $f(x+3)=3x^2 + 7x + 4$ a...
theorem tst1 (x y z : Nat) : y = z → x = x → x = y → x = z := by { intros h1 h2 h3; revert h2; intro h2; exact Eq.trans h3 h1 } theorem tst2 (x y z : Nat) : y = z → x = x → x = y → x = z := by { intros h1 h2 h3; revert y; intros y hb ha; exact Eq.trans ha hb } theorem tst3 (x y z : Nat) : y = z → x ...
universe u theorem instForAll {A : Type u} {f : A → Prop} {a : A} : (forall a' : A, f a') → f a := by intro h exact h a theorem instEqual₁ {A : Type u} {P : A → Prop} {t : A} : (forall x : A, x = t → P x) → P t := by intro h exact h t rfl theorem instEqual₂ {A : Type u} {P : A → Prop} {t : A} : P t → (...
lemma ne_succ_self (n : ℕ) : n ≠ nat.succ n := begin end
import data.real.basic import data.set.intervals.unordered_interval theorem USAMO_Problem_3_1993 (f : ℝ -> ℝ) [f ≥ 0] [f(1) = 1]: (∀ x y : ℝ, (x ∈ (set.interval (0 : ℝ) (1: ℝ)) ∧ y ∈ (set.interval (0 : ℝ) (1: ℝ))) → x+y ∈ (set.interval (0 : ℝ) (1: ℝ)) → f(x) + f(y) ≤ f(x+y)) → (∀ x : ℝ, x ∈ (set.interval (0 : ℝ) (...
informal statement Prove that $\cos 1^{\circ}$ is algebraic over $\mathbb{Q}$.formal statement theorem exercise_5_3_10 : is_algebraic ℚ (cos (real.pi / 180)) :=
lemma convex_prod: assumes "\<And>i. i \<in> Basis \<Longrightarrow> convex {x. P i x}" shows "convex {x. \<forall>i\<in>Basis. P i (x\<bullet>i)}"
section variables (P Q : Prop) theorem my_theorem : P ∧ Q → Q ∧ P := assume h : P ∧ Q, have P, from and.left h, have Q, from and.right h, show Q ∧ P, from and.intro ‹Q› ‹P› end
informal statement Let $F = \mathbb{Z}_p$ be the field of integers $\mod p$, where $p$ is a prime, and let $q(x) \in F[x]$ be irreducible of degree $n$. Show that $F[x]/(q(x))$ is a field having at exactly $p^n$ elements.formal statement theorem exercise_4_5_25 {p : ℕ} (hp : nat.prime p) : irreducible (∑ i : finset.r...
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Kenny Lau -/ import data.finset.basic /-! # Finsets of ordered types -/ universes u v w variables {α : Type u} theorem directed.finset_le {r : α → α → Prop} [is_tra...
lemma of_real_0 [simp]: "of_real 0 = 0"
import PnP2023.Lec_01_25.Answer namespace Waffle theorem Answer.eq_of_le_le (a b : Answer) : a ≤ b → b ≤ a → a = b := by sorry
example : ∀ a b c : ℕ, a = b → a = c → c = b := begin intros, transitivity, symmetry, assumption, assumption end
lemma reflect_poly_0 [simp]: "reflect_poly 0 = 0"
lemma frontier_empty [simp]: "frontier {} = {}"
/- Copyright (c) 2015 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis, Jeremy Avigad The square root function. -/ import .ivt open analysis real classical topology noncomputable theory private definition sqr_lb (x : ℝ) : ℝ := 0 privat...
def g (x : Nat) (b : Bool) := if b then x - 1 else x + 1 theorem g_eq (x : Nat) (h : ¬ x = 0) : g x (x > 0) = x - 1 ∧ g x false = x + 1 := by have : x > 0 := by match x with | 0 => contradiction | x+1 => apply Nat.zero_lt_succ simp [g, this] macro_rules | `(tactic| decreasing_tactic) => `(tac...
/- lemma divides_p_times (r : ℕ) (n : ℕ) : p^r ∣ n ↔ p^(r+1) ∣ (p * n) := calc p^r ∣ n ↔ (p * p^r) ∣ (p * n) : (nat.mul_dvd_mul_iff_left (gt_zero hp)).symm ... = (p^r * p ∣ p * n) : by rw mul_comm lemma exactly_divides_p_times (r : ℕ) (n : ℕ) : p^r ∣∣ n ↔ p^(r+1) ∣∣ (p * n) := have eq : (p * n) / p^(r+...
section variables (x y z : ℕ) variables (h₁ : x = y) (h₂ : y = z) include h₁ h₂ theorem foo : x = z := begin rw [h₁, h₂] end omit h₁ h₂ theorem bar : x = z := eq.trans h₁ h₂ theorem baz : x = x := rfl #check @foo #check @bar #check baz end
/- Copyright (c) Sébastien Gouëzel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sébastien Gouëzel, Yourong Zang ! This file was ported from Lean 3 source module analysis.complex.real_deriv ! leanprover-community/mathlib commit e9be2fa75faa22892937c275e27a91cd558cf8...
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Eric Wieser -/ import algebra.char_p.basic import algebra.ring_quot /-! # Characteristic of quotients rings -/ universes u v namespace char_p theorem quotient (R : Type u) [...
State Before: α : Type u m : OuterMeasure α s✝ s₁ s₂ : Set α s : ℕ → Set α h : ∀ (i : ℕ), IsCaratheodory m (s i) hd : Pairwise (Disjoint on s) t : Set α ⊢ ∑ i in Finset.range 0, ↑m (t ∩ s i) = ↑m (t ∩ ⋃ (i : ℕ) (_ : i < 0), s i) State After: no goals Tactic: simp [Nat.not_lt_zero, m.empty] State Before: α : Type u m : ...
From iris.proofmode Require Import tactics. From aneris.aneris_lang Require Import network adequacy. From aneris.aneris_lang.program_logic Require Export aneris_weakestpre. Definition aneris_adequate (e :expr) (ip : ip_address) (σ : state) (φ : val → Prop) := adequate NotStuck (mkExpr ip e) σ (λ v _, ∃ w...
Class inhabited(A: Type): Type := mk_inhabited { default: A }. Global Arguments mk_inhabited {_} _. Global Hint Mode inhabited + : typeclass_instances. Global Hint Extern 1 (inhabited _) => simple refine (mk_inhabited _); constructor : typeclass_instances. Module InhabitedTests. Goal inhabited nat. typeclasses ...
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Yury Kudryashov -/ import data.real.sqrt import tactic.interval_cases import ring_theory.algebraic import data.rat.sqrt ...
lemma coeffs_map_poly [code abstract]: "coeffs (map_poly f p) = strip_while ((=) 0) (map f (coeffs p))"
informal statement Let $V$ be a vector space which is spanned by a countably infinite set. Prove that every linearly independent subset of $V$ is finite or countably infinite.formal statement theorem exercise_6_1_14 (G : Type*) [group G] (hG : is_cyclic $ G ⧸ (center G)) : center G = ⊤ :=
theorem very_easy : true := begin sorry end
/- Copyright (c) 2021 Ashvni Narayanan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ashvni Narayanan -/ import tendsto_zero_of_sum_even_char --import p_adic_L_function_def -- import general_bernoulli_number.basic -- import topology.algebra.nonarchimedean.bases -- im...
import .affine_space_type import .affine_frame import data.real.basic def reals_as_affine_space := affine_space_type ℝ ℝ ℝ #check reals_as_affine_space def reals_as_affine_space_1 : reals_as_affine_space := ⟨⟩ def reals_as_affine_space_2 : reals_as_affine_space := ⟨⟩ example : reals_as_affine_space_...
[STATEMENT] lemma min_enat_simps [simp]: "min (enat m) (enat n) = enat (min m n)" "min q 0 = 0" "min 0 q = 0" "min q (\<infinity>::enat) = q" "min (\<infinity>::enat) q = q" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (min (enat m) (enat n) = enat (min m n) &&& min q 0 = 0) &&& min 0 q = 0 &&& min q \<i...
/- Copyright (c) 2021 Alain Verberkmoes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alain Verberkmoes -/ import data.int.basic /-! # IMO 2011 Q5 Let `f` be a function from the set of integers to the set of positive integers. Suppose that, for any two integers `...
import Mathlib.Data.Rat.Order import Mathlib.Tactic.Ring /- 4 points -/ theorem problem1 {x : ℚ} (hx : x = 2/3) : 3 * x ≠ 1 := by apply ne_of_gt calc 3 * x = 3 * (2 / 3) := by rw [hx] _ > 1 := by rfl /- 5 points -/ theorem problem2 {x y : ℚ} (h : x = 1 ∨ y = -1) : x * y + x = y + 1 := by cases' h with hx ...
{-# OPTIONS --rewriting #-} postulate _↦_ : {A : Set} → A → A → Set idr : {A : Set} {a : A} → a ↦ a {-# BUILTIN REWRITE _↦_ #-} record _×_ (A B : Set) : Set where constructor _,_ field fst : A snd : B postulate A B C : Set g : A → B → C f : A × B → C f (x , y) = g x y postulate D : Set P ...
/- Description : Formalization of islanders problem for two people. Copyright : (c) Daniel Selsam, 2018 License : GPL-3 -/ import .util .knows .problem theorem islanders_n2 : islanders 2 := assume everyone_sees : ∀ (d₁ d₂ : day) (p₁ p₂ : person), p₂ ≠ p₁ → common_knowledge (is_marked p₂ → knows d₂ p₁ (is_...
lemma of_real_1 [simp]: "of_real 1 = 1"
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Eric Wieser -/ import algebra.char_p.basic import ring_theory.ideal.quotient /-! # Characteristic of quotients rings -/ universes u v namespace char_p theorem quotient (R : ...
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Yury Kudryashov -/ import data.real.sqrt import data.rat.sqrt import ring_theory.int.basic import data.polynomial.eval i...
informal statement If $s_{1}=\sqrt{2}$, and $s_{n+1}=\sqrt{2+\sqrt{s_{n}}} \quad(n=1,2,3, \ldots),$ prove that $\left\{s_{n}\right\}$ converges, and that $s_{n}<2$ for $n=1,2,3, \ldots$.formal statement theorem exercise_3_6a : tendsto (λ (n : ℕ), (∑ i in finset.range n, g i)) at_top at_top :=
lemmas has_derivative_Im [derivative_intros] = bounded_linear.has_derivative[OF bounded_linear_Im]
informal statement Let $f$ and $g$ be continuous mappings of a metric space $X$ into a metric space $Y$, and let $E$ be a dense subset of $X$. Prove that $f(E)$ is dense in $f(X)$.formal statement theorem exercise_4_4a {α : Type} [metric_space α] {β : Type} [metric_space β] (f : α → β) (s : set α) (h₁ : conti...
import tactic -- the next two lines let us use the law of the excluded middle without trouble noncomputable theory open_locale classical --BEGIN-- /-------------------------------------------------------------------------- Delete the ``sorry,`` below and replace them with a legitimate proof. -----------------------...