text
stringlengths
0
3.34M
[GOAL] ⊢ 1 = ‖↑reClm 1‖ [PROOFSTEP] simp [GOAL] ⊢ ‖1‖ ≤ 1 [PROOFSTEP] simp [GOAL] ⊢ 1 = ‖↑imClm I‖ [PROOFSTEP] simp [GOAL] ⊢ ‖I‖ ≤ 1 [PROOFSTEP] simp
postulate ∞ : ∀ {a} (A : Set a) → Set a ♯_ : ∀ {a} {A : Set a} → A → ∞ A ♭ : ∀ {a} {A : Set a} → ∞ A → A {-# BUILTIN INFINITY ∞ #-} {-# BUILTIN SHARP ♯_ #-} {-# BUILTIN FLAT ♭ #-} {-# COMPILE GHC ♭ as flat #-}
import MyNat.Definition import AdditionWorld.Level4 -- add_comm import AdvancedAdditionWorld.Level5 -- add_right_cancel namespace MyNat open MyNat /-! # Advanced Addition World ## Level 7: `add_right_cancel_iff` It's sometimes convenient to have the "if and only if" version of theorems like `add_right_cancel`. Reme...
informal statement Prove that for each positive integer $n$, the number $10^{10^{10^n}}+10^{10^n}+10^n-1$ is not prime.formal statement theorem exercise_2000_a2 : ∀ N : ℕ, ∃ n : ℕ, n > N ∧ ∃ i : fin 6 → ℕ, n = (i 0)^2 + (i 1)^2 ∧ n + 1 = (i 2)^2 + (i 3)^2 ∧ n + 2 = (i 4)^2 + (i 5)^2 :=
informal statement An ideal $N$ is called nilpotent if $N^{n}$ is the zero ideal for some $n \geq 1$. Prove that the ideal $p \mathbb{Z} / p^{m} \mathbb{Z}$ is a nilpotent ideal in the ring $\mathbb{Z} / p^{m} \mathbb{Z}$.formal statement theorem exercise_7_3_37 {R : Type*} {p m : ℕ} (hp : p.prime) (N : ideal $ zmod...
! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. ! See https://llvm.org/LICENSE.txt for license information. ! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception subroutine weird(dummy) class(*), target :: dummy(:) end subroutine weird program main integer(kind=4), pointer :: ...
(* Title: HOL/Bali/Trans.thy Author: David von Oheimb and Norbert Schirmer Operational transition (small-step) semantics of the execution of Java expressions and statements PRELIMINARY!!!!!!!! *) theory Trans imports Evaln begin definition groundVar :: "var \<Rightarrow> bool" where "groundVar v ...
informal statement Prove that there exist infinitely many integers $n$ such that $n, n+1, n+2$ are each the sum of the squares of two integers.formal statement theorem exercise_1998_a3 (f : ℝ → ℝ) (hf : cont_diff ℝ 3 f) : ∃ a : ℝ, (f a) * (deriv f a) * (iterated_deriv 2 f a) * (iterated_deriv 3 f a) ≥ 0 :=
import Smt import Smt.Data.BitVec theorem append_eq_shl_or_2 (x y : BitVec 2) : x ++ y = (x.zeroExtend 2 <<< 2) ||| y.zeroExtend 2 := by smt sorry theorem append_eq_shl_or_3 (x y : BitVec 3) : x ++ y = (x.zeroExtend 3 <<< 3) ||| y.zeroExtend 3 := by smt sorry
From demo Require Import simplified_iris. Section proof. Context `{!heapGS Σ}. Theorem coq_swap (P Q: Prop): P ∧ Q → Q ∧ P. Proof. intros H. destruct H as [HP HQ]. split. - apply HQ. - apply HP. Qed. Theorem prove_swap_the_hard_way x y : x ↦ #0 ∗ y ↦ #3 ⊢ y ↦ #3 ∗ x ↦ #0. Proof. iIntros "H". iDestr...
import data.real.basic -- BEGIN theorem not_monotone_iff {f : ℝ → ℝ}: ¬ monotone f ↔ ∃ x y, x ≤ y ∧ f x > f y := by { rw monotone, push_neg } example : ¬ monotone (λ x : ℝ, -x) := begin rw monotone, push_neg, use -2, use -1, norm_num, end -- END
[GOAL] ⊢ IsPrincipalIdealRing { x // x ∈ 𝓞 ℚ } [PROOFSTEP] convert IsPrincipalIdealRing.of_surjective (Rat.ringOfIntegersEquiv.symm : ℤ →+* ringOfIntegers ℚ) Rat.ringOfIntegersEquiv.symm.surjective
-- UNDER CONSTRUCTION. IGNORE. /- Now that we've defined our base and step "machines" (lemmas), we assemble them into an overall proof by applying the induction axiom to them. -/ theorem left_zero : ∀ n, 0 + n = n := _ /- EXERCISE: Reformulate the formal proof in the class notes, ∀ n, 0 + n = n := _ to use Lean's in...
-- Derek Johnson def s1 := "Hello, " def s2 := "Nifty!" def s3 := s1 ++ s2 theorem t1 : (s1 ++ s2) = s3 := eq.refl s3 theorem t2 : 4^2 = 16 := eq.refl 16 theorem t3 : (s1 ++ s2) = s3 ∧ (5^2 = 25) := and.intro (eq.refl s3) (eq.refl 25) theorem t4 : ∀ (P Q R : Prop), (P ∧ Q) ∧ (Q ∧ R) → (P ∧ R) := λ...
/- Copyright (c) 2022 Arthur Paulino. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arthur Paulino -/ import FxyLang.Reasoning.Defs theorem State.stepNComp : (s^[n₁])^[n₂] = s^[n₁ + n₂] := by induction n₁ generalizing s with | zero => simp [stepN] | succ...
-- Math 52: Quiz 5 -- Open this file in a folder that contains 'utils'. import utils open classical definition divides (a b : ℤ) : Prop := ∃ (k : ℤ), b = a * k local infix ∣ := divides axiom not_3_divides : ∀ (m : ℤ), ¬ (3 ∣ m) ↔ 3 ∣ m - 1 ∨ 3 ∣ m + 1 lemma not_3_divides_of_3_divides_minus_1 : ∀ (m : ℤ), 3 ∣ m - 1...
lemmas landau_symbols_if_at_top_eq [simp] = landau_symbols[THEN landau_symbol_if_at_top_eq]
lemma coeff_0_reflect_poly_0_iff [simp]: "coeff (reflect_poly p) 0 = 0 \<longleftrightarrow> p = 0"
informal statement Suppose $k \geq 3, x, y \in \mathbb{R}^k, |x - y| = d > 0$, and $r > 0$. Prove that if $2r > d$, there are infinitely many $z \in \mathbb{R}^k$ such that $|z-x|=|z-y|=r$.formal statement theorem exercise_1_18a (n : ℕ) (h : n > 1) (x : euclidean_space ℝ (fin n)) -- R^n : ∃ (y : euclidean_space...
informal statement Prove that $\mathbb{Q}$ has no proper subgroups of finite index.formal statement theorem exercise_3_2_21a (H : add_subgroup ℚ) (hH : H ≠ ⊤) : H.index = 0 :=
[STATEMENT] lemma subst_simps [simp]: "subst x t x = t" "subst x (Var x) = Var" [PROOF STATE] proof (prove) goal (1 subgoal): 1. subst x t x = t &&& subst x (Var x) = Var [PROOF STEP] by (auto simp: subst_def)
-- Given p : A ⟷ B do action on X act : (A ⟷ B) ⟷ (X ⟷ X) act = ?
theory Axler imports Complex_Main "HOL-Analysis.Inner_Product" "HOL-Analysis.Abstract_Euclidean_Space" "HOL.Vector_Spaces" "Rank_Nullity_Theorem.Fundamental_Subspaces" (*"HOL-Analysis.Weierstrass_Theorems"*) "HOL-Computational_Algebra.Polynomial" (* Note by Angeliki: some types chosen are too general, some others to...
/- 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 theorem mathd_algebra_140 (a b c : ℝ) ...
import data.list.basic open list universe u variables {α : Type} (x y z : α) (xs ys zs : list α) def mk_symm (xs : list α) := xs ++ reverse xs theorem reverse_mk_symm (xs : list α) : reverse (mk_symm xs) = mk_symm xs := by simp [mk_symm] attribute [simp] reverse_mk_symm example (xs ys : list ℕ) : reverse (xs ...
import smt2 lemma negation_of_conj : forall (P Q : Prop), not (P ∧ Q) ↔ not P ∨ not Q := by intros; z3 "d1.log" lemma negation_of_disj : forall (P Q : Prop), ¬ (P ∨ Q) ↔ ¬ P ∧ ¬ Q := begin intros, z3 end #print negation_of_conj #print negation_of_disj
informal statement Show that if $\prod X_\alpha$ is regular, then so is $X_\alpha$. Assume that each $X_\alpha$ is nonempty.formal statement theorem exercise_32_3 {X : Type*} [topological_space X] (hX : locally_compact_space X) (hX' : t2_space X) : regular_space X :=
import M4R.Algebra.Ring.IdealZorn import M4R.Algebra.Ring.Localisation import M4R.Algebra.Ring.Radical namespace M4R open Monoid NCSemiring Semiring NCRing variable {A : Type _} [Ring A] {I : Ideal A} -- Theorem 1.1 private theorem t1_1 (hI : I.proper_ideal) : ∃ J : Ideal A, I ⊆ J ∧ J.is_maximal := let ⟨...
lemma holomorphic_on_If_Un [holomorphic_intros]: assumes "f holomorphic_on A" "g holomorphic_on B" "open A" "open B" assumes "\<And>z. z \<in> A \<Longrightarrow> z \<in> B \<Longrightarrow> f z = g z" shows "(\<lambda>z. if z \<in> A then f z else g z) holomorphic_on (A \<union> B)" (is "?h holomorphic_on _")
-- structure S := (g {α} : α → α) def f (h : Nat → ({α : Type} → α → α) × Bool) : Nat := (h 0).1 1 def tst : Nat := f fun n => (fun x => x, true) theorem ex : id (Nat → Nat) := by { intro; assumption } def g (i j k : Nat) (a : Array Nat) (h₁ : i < k) (h₂ : k < j) (h₃ : j < a.size) : Nat := let vj := a.get ⟨...
lemma connected_empty [simp]: "connected {}"
def g (x : Nat) : List (Nat × List Nat) := [(x, [x, x]), (x, [])] def h (x : Nat) : List (Nat × List Nat) := g x |>.filter fun ⟨_, xs⟩ => xs.isEmpty theorem ex1 : g 10 = [(10, [10, 10]), (10, [])] := rfl theorem ex2 : h 10 = [(10, [])] := rfl
opaque A : Nat → Type opaque f (x : Nat) (a : A x) : Nat example (x : Nat) (a : A (x + 0)) : f (x + 0) a = x := by simp trace_state -- ⊢ f x a = x sorry example (x : Nat) (a : A (x + 0)) : f (x + 0) a = x := by simp (config := { dsimp := false }) trace_state -- ⊢ f (x + 0) a = x sorry
----------------------------------------------------------------------------- -- | -- Module : Berp.Base.Truth -- Copyright : (c) 2010 Bernie Pope -- License : BSD-style -- Maintainer : florbitous@gmail.com -- Stability : experimental -- Portability : ghc -- -- Implementation of the truth predicate on Pyt...
theory deMorgan1 imports Main begin text\<open> Apply style \<close> lemma lem_k_1 : "\<not>(p \<or> q) \<longrightarrow> (\<not>p \<and> \<not>q)" apply (rule impI) apply (rule conjI) apply (rule notI) apply (erule notE) apply(rule disjI1) apply assumption apply (rule notI) ...
import smt2 lemma p_implies_p (P : Prop) : P → P := begin intros, z3 end
theory Check imports Submission begin theorem double_len: "length (double xs) = 2 * length xs" by (rule Submission.double_len) theorem reverse_double: "reverse (double xs) = double (reverse xs)" by (rule Submission.reverse_double) theorem rev_double: "rev (double xs) = double (rev xs)" by (rule Submission.re...
lemmas continuous_Re [simp] = bounded_linear.continuous [OF bounded_linear_Re]
def head {α} : (as : List α) → as ≠ [] → α | [], h => absurd rfl h | a::as, _ => a theorem head_cons {α} (a : α) (as : List α) : head (a::as) (fun h => List.noConfusion h) = a := rfl theorem head_cons' {α} (a : α) (as : List α) (h : a::as ≠ []) : head (a::as) h = a := rfl
import data.nat.digits open nat open int /- (a) Prove the "rule of 9": an integer is divisible by 9 if and only if the sum of its digits is divisible by 9. (b) Prove the "rule of 11" stated in Example 13.6. Use this rule to decide in your head whether the number 82918073579 is divisible by 11. -/ lemma part_a (n : ℤ...
(* Title: Code_Int_Integer_Conversion.thy Author: Andreas Lochbihler, ETH Zurich *) chapter \<open>A special case of a conversion.\<close> theory Code_Int_Integer_Conversion imports Main begin text \<open> Use this function to convert numeral @{typ integer}s quickly into @{typ int}s. By default, ...
/- Copyright (c) 2019 Neil Strickland. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Neil Strickland -/ import data.nat.choose import algebra.prod_equiv import tactic.squeeze /- Consider the identity (choose n k) = (choose k-1 k-1) + (choose k k-1) + ... + (choo...
informal statement Let $R$ be the ring of $2 \times 2$ matrices over the real numbers; suppose that $I$ is an ideal of $R$. Show that $I = (0)$ or $I = R$.formal statement theorem exercise_4_5_16 {p n: ℕ} (hp : nat.prime p) {q : polynomial (zmod p)} (hq : irreducible q) (hn : q.degree = n) : ∃ is_fin : fintype $ p...
/- ----------------------------------------------------------------------- Categories. ----------------------------------------------------------------------- -/ import ...p0_stdlib namespace qp open stdaux universe variables ℓ ℓobj ℓhom ℓobj₁ ℓhom₁ ℓobj₂ ℓhom₂ /-! #brief A strict category. -/ structure Cat : ...
lemma monom_eq_1 [simp]: "monom 1 0 = 1"
(* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) *) theory ptr_modifies imports "Word_Lib.WordSetup" "CParser.CTranslation" begin exter...
import data.real.irrational import topology.basic import algebra.order.floor --OUTPUT 1 theorem irrational_orbit_dense {α : ℝ} (hα_irrat : irrational α) : closure ((λ m : ℤ, int.fract (α * ↑m)) '' (@set.univ ℤ)) = set.Icc 0 1 :=density_of_irrational_orbit (α : ℝ) (hα : ¬ is_rat α) : ∀ y ∈ Icc 0 1, ∃ x ∈ Icc 0 1, x ≠ ...
def s1 := "Hello, " def s2 := "Nifty!" def s3 := s1 ++ s2 theorem t1 : s1 ++ s2 = s3 := _ theorem t2 : 4^2 = 16 := _ theorem t3 : s1 ++ s2 = s3 ∧ 5^2 = 25 := _ theorem t4 : ∀ (P Q R : Prop), (P ∧ Q) ∧ (Q ∧ R) → (P ∧ R) := λ (P Q R : Prop), and.intro _ _
import algebra.module.basic import algebra.module.linear_map import linear_algebra.basic import linear_algebra.prod import linear_algebra.projection import order.bounded_lattice theorem cpge_reduction_3_a (R : Type*) (M : Type*) [semiring R] [add_comm_monoid M] [module R M] [E : submodule R M] (u : linear_map R E E...
import data.real.basic #check sub_self #check abs_zero def converges_to (s : ℕ → ℝ) (a : ℝ) := ∀ ε > 0, ∃ N, ∀ n ≥ N, abs (s n - a) < ε theorem converges_to_const (a : ℝ) : converges_to (λ x : ℕ, a) a := begin intros ε epos, dsimp, rw sub_self, norm_num, use 0, intros n nge, exact epos, end example...
/- Copyright (c) 2021 Sara Díaz Real. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Sara Díaz Real -/ import data.int.basic import algebra.associated import tactic.linarith import tactic.ring /-! # IMO 2001 Q6 Let $a$, $b$, $c$, $d$ be integers with $a > b > c > d > ...
////////////////////////////////////////////////////////////////////////////////////// // distribution::toolkit::distributions::chi_squared::description.hpp // // // // (C) Copyright 2009 Erwann Rogard ...
informal statement Let $\Omega$ be a bounded open subset of $\mathbb{C}$, and $\varphi: \Omega \rightarrow \Omega$ a holomorphic function. Prove that if there exists a point $z_{0} \in \Omega$ such that $\varphi\left(z_{0}\right)=z_{0} \quad \text { and } \quad \varphi^{\prime}\left(z_{0}\right)=1$ then $\varphi$ is li...
/- 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 theorem mathd_algebra_547 (x y : ℝ) (...
class CommAddSemigroup (α : Type u) extends Add α where addComm : {a b : α} → a + b = b + a addAssoc : {a b c : α} → a + b + c = a + (b + c) open CommAddSemigroup theorem addComm3 [CommAddSemigroup α] {a b c : α} : a + b + c = a + c + b := by { have h : b + c = c + b := addComm; have h' := congrArg (a...
import Smt theorem assoc (f : Prop → Prop → Prop) (p q r : Prop) : f p (f q r) = f (f p q) r := by smt admit
import data.set.basic variables {α : Type*} {β : Type*} [s : setoid α] namespace quotient lemma prod_preimage_eq_image (g : quotient s → β) {h : α → β} (Hh : h = g ∘ quotient.mk) (r : set (β × β)) : {x : quotient s × quotient s | (g x.1, g x.2) ∈ r} = (λ a : α × α, (⟦a.1⟧, ⟦a.2⟧)) '' ((λ a : α × α, (h a.1, h a.2))...
import data.real.basic -- TODO: Move. lemma mul_Inf {K : ℝ} (hK : 0 ≤ K) {p : ℝ → Prop} (h : ∃ x, 0 ≤ x ∧ p x) (hp : p (Inf {x | 0 ≤ x ∧ p x})) : K * Inf {x | 0 ≤ x ∧ p x} = Inf {y | ∃ x, (y : ℝ) = K * x ∧ 0 ≤ x ∧ p x} := begin rcases h with ⟨i, hnni, hpi⟩, let S := {y | ∃ x, y = K * x ∧ 0 ≤ x ∧ p x}, apply ...
/- Copyright (c) 2019 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Eric Wieser -/ import linear_algebra.span import linear_algebra.bilinear_map /-! # Images of pairs of submodules under bilinear maps > THIS FILE IS SYNCHRONIZED WITH MATHLIB4. ...
my_f(x,y) = 2*x+3*y derivative_of_my_f(x,y) = ForwardDiff.derivative(x->my_f(x,y),x)
/- Copyright (c) 2022 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov ! This file was ported from Lean 3 source module analysis.complex.upper_half_plane.metric ! leanprover-community/mathlib commit f06058e64b7e8397234455038f3f8aec83aaba...
-- Notes 11/26/2019 -- false is not provable, except from a contradiction -- if we reach a proof of false, our proposition must be false -- false also implies anything example : false → 0 = 1 := false.elim example : ∀ (P : Prop), false → P := λ (p), λ (f), false.elim f #check @false.elim -- If we can show that P ...
informal statement If $f$ is a continuous mapping of a metric space $X$ into a metric space $Y$, prove that $f(\overline{E}) \subset \overline{f(E)}$ for every set $E \subset X$. ($\overline{E}$ denotes the closure of $E$).formal statement theorem exercise_4_2a {α : Type} [metric_space α] {β : Type} [metric_space β...
State Before: α : Type u β : Type v ι : Type ?u.76247 π : ι → Type ?u.76252 inst✝¹ : TopologicalSpace α inst✝ : TopologicalSpace β s t : Set α h : ∀ {ι : Type u} (Z : ι → Set α), (∀ (i : ι), IsClosed (Z i)) → (⋂ (i : ι), Z i) = ∅ → ∃ t, (⋂ (i : ι) (_ : i ∈ t), Z i) = ∅ ι✝ : Type u Z : ι✝ → Set α ⊢ (∀ (i : ι✝), Is...
lemma poly_shift_id [simp]: "poly_shift 0 = (\<lambda>x. x)"
lemma psize_eq_0_iff [simp]: "psize p = 0 \<longleftrightarrow> p = 0"
/- Copyright (c) 2020 Aaron Anderson. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Aaron Anderson -/ import number_theory.arithmetic_function import number_theory.lucas_lehmer import algebra.geom_sum import ring_theory.multiplicity /-! # Perfect Numbers This file ...
Require Import Program Arith. Program Fixpoint check_n (n : nat) (P : { i | i < n } -> bool) (p : nat) (H : forall (i : { i | i < n }), i < p -> P i = true) {measure (n - p)} : Exc (forall (p : { i | i < n}), P p = true) := match le_lt_dec n p with | left _ => value _ | right cmp => if dec (P p) the...
/- Copyright (c) 2023 María Inés de Frutos-Fernández. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Author : María Inés de Frutos-Fernández -/ import tactic import data.real.basic /- # Límites de secuencias en Lean Escribimos la definicón `ε` - `N` del límite de una secuenc...
informal statement Let $V$ be a vector space over an infinite field $F$. Show that $V$ cannot be the set-theoretic union of a finite number of proper subspaces of $V$.formal statement theorem exercise_5_3_10 : is_algebraic ℚ (cos (real.pi / 180)) :=
postulate T : Set → Set X : Set Class : Set → Set member : ∀ {A} {{C : Class A}} → A → A iX : Class X iT : ∀ {A} {{CA : Class A}} → Class (T A) -- Should get type Class (T X), -- not {{_ : Class X}} → Class (T X) iTX = iT {A = X} -- Fails if not expanding instance argument in iTX f : T X → T X f = memb...
(* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the GNU General Public License version 2. Note that NO WARRANTY is provided. * See "LICENSE_GPLv2.txt" for details. * * @TAG(NICTA_GPL) *) theory CToCRefine imports "../../spec/cspec/Substitute" "../S...
import Smt theorem refl (p : Prop) : p = p := by smt
State Before: V : Type u V' : Type v V'' : Type w G : SimpleGraph V G' : SimpleGraph V' G'' : SimpleGraph V'' u v : V p : Walk G u v H : SimpleGraph V hp : ∀ (e : Sym2 V), e ∈ edges p → e ∈ edgeSet H pp : IsPath p ⊢ IsPath (Walk.transfer p H hp) State After: no goals Tactic: induction p with | nil => simp | cons _ _ ih...
header {* \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 \<le...
State Before: q : ℚ x y : ℝ ⊢ Irrational (x + y) → Irrational x ∨ Irrational y State After: q : ℚ x y : ℝ ⊢ ¬x + y ∈ Set.range Rat.cast → ¬x ∈ Set.range Rat.cast ∨ ¬y ∈ Set.range Rat.cast Tactic: delta Irrational State Before: q : ℚ x y : ℝ ⊢ ¬x + y ∈ Set.range Rat.cast → ¬x ∈ Set.range Rat.cast ∨ ¬y ∈ Set.range Rat.ca...
lemma reflect_poly_1 [simp]: "reflect_poly 1 = 1"
/- Copyright (c) 2023 David Loeffler. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: David Loeffler ! This file was ported from Lean 3 source module number_theory.modular_forms.jacobi_theta ! leanprover-community/mathlib commit fe44cd36149e675eb5dec87acc7e8f1d6568e081...
Require Import LiterateCoq.Tactics. Require Import Compiler. Require Import ZArith. Lemma list_pointless_split : forall A B:Type, forall l : list A, forall x : B, match l with | nil => x | (_ :: _)%list => x end = x. Proof. destruct l; eauto. Qed. Lemma list_pointless_split' : forall A B:Type, forall l : li...
/- Copyright (c) 2019 Alexander Bentkamp. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alexander Bentkamp, Yury Kudriashov -/ import Mathlib.PrePort import Mathlib.Lean3Lib.init.default import Mathlib.data.set.intervals.ord_connected import Mathlib.data.set.intervals...
/- 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 4c19a16e4b705bf135cf9a80ac18fcc99c438514 ! Ple...
import hilbert.wr.or import hilbert.wr.or_bot namespace clfrags namespace hilbert namespace wr namespace or_bot theorem db₁_or {a b : Prop} (h₁ : or b (or a bot)) : or b a := have h₂ : or (or b a) bot, from or.d₄ h₁, show or b a, from db₁...
Require ILLImplementation. Require ResILLBase. Extract Inductive bool => "bool" [ "true" "false" ]. Extract Inductive sumbool => "bool" ["true" "false" ]. Extract Inductive sumor => "option" ["Some" "None" ]. Extract Inductive option => "option" ["Some" "None" ]. Extract Inductive unit => "unit" ["()"]. Extract Induct...
[STATEMENT] lemma rule_states_l_correct[simp]: "ls_\<alpha> (rule_states_l r) = rule_states r" "ls_invar (rule_states_l r)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ls.\<alpha> (rule_states_l r) = rule_states r &&& ls.invar (rule_states_l r) [PROOF STEP] by (cases r, simp add: ls.correct)+
import algebra.group_power tactic.norm_num algebra.big_operators theorem Q2 (n : ℕ) : n ≥ 2 → nat.pow 4 n > nat.pow 3 n + nat.pow 2 n :=
PRINT X ++ 5 END
State Before: f g : ℂ → ℂ s : Set ℂ f' g' x c : ℂ ⊢ ↑((g x * f x ^ (g x - 1)) • ContinuousLinearMap.smulRight 1 f' + (f x ^ g x * log (f x)) • ContinuousLinearMap.smulRight 1 g') 1 = g x * f x ^ (g x - 1) * f' + f x ^ g x * log (f x) * g' State After: no goals Tactic: simp only [Algebra.id.smul_eq_m...
[STATEMENT] lemma eval_tm_SNOC[simp]: "\<lbrakk>length is \<le> #\<^sub>V \<AA>; #\<^sub>V \<AA> = length x\<rbrakk> \<Longrightarrow> eval_tm (SNOC x \<AA>) is = eval_tm \<AA> is + 2 ^ Length \<AA> * scalar_product x is" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>length is \<le> #\<^sub>V \<AA>; #...
Welcome to Coq 8.4pl4 (November 2015) Coq < Theorem mult_0_plus' : forall n m : nat, (0 + n) * m = n * m. 1 subgoal ============================ forall n m : nat, (0 + n) * m = n * m mult_0_plus' < Proof. 1 subgoal ============================ forall n m : nat, (0 + n) * m = n * m mult_0_plus' < info...
variables (f : ℕ → ℕ) (a b : ℕ) example (h₁ : a = b) (h₂ : f a = 0) : f b = 0 := begin rw [←h₁, h₂] end
theory Scratch imports Main begin lemma \<open>\<forall>x. P x\<close> oops text \<open>This is another test. There are multiple things to do. \<close> notepad begin fix S T :: 'a have \<open>T = S\<close> if \<open>S = T\<close> for S using that by auto have \<open>T = S\<close> if ...
#ifndef _GDRDGEMM_H #define _GDRDGEMM_H #ifndef MKL #include <cblas.h> #else #include <mkl_cblas.h> #endif #define NMAT 2048 void gdr_check_and_restart(double a[][NMAT], double b[][NMAT], double c[][NMAT]); void gdrblas_dgemm ( #ifndef MKL const enum CBLAS_ORDER ORDER, const enum CBLA...
/- Copyright (c) 2022 Jannis Limperg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Asta H. From, Jannis Limperg -/ -- This test checks whether the output of trace.aesop.proof is -- copy-and-pastable. When the test breaks because Aesop's output has changed, -- please...
theorem my_first_theorem (P : Prop) : P → P := begin intro, assumption, end
informal statement Let $f: S^{1} \rightarrow \mathbb{R}$ be a continuous map. Show there exists a point $x$ of $S^{1}$ such that $f(x)=f(-x)$.formal statement theorem exercise_25_4 {X : Type*} [topological_space X] [loc_path_connected_space X] (U : set X) (hU : is_open U) (hcU : is_connected U) : is_path_connected ...
/- This example demonstrates why allowing types such as inductive D : Type := | intro : (D → D) → D would make the system inconsistent -/ /- If we were allowed to form the inductive type inductive D : Type := | intro : (D → D) → D we would get the following -/ universe l -- The new type A axiom D : Ty...
/- 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 theorem mathd_algebra_11 (a b : ℝ) (h...
lemma iff_trans (P Q R : Prop) : (P ↔ Q) → (Q ↔ R) → (P ↔ R) := begin intros pq qr, split, { intro p, apply qr.1, apply pq.1, exact p, }, { intro r, apply pq.2, apply qr.2, exact r, }, end lemma iff_trans_2 (P Q R : Prop) : (P ↔ Q)...
partial def inf (u : Unit) : List Unit := u :: inf u theorem aa : False := nomatch (⟨inf._unsafe_rec (), rfl⟩ : ∃ l, l = () :: l)
lemma le_refl (x : mynat) : x ≤ x := begin use 0, refl, end