text stringlengths 0 3.34M |
|---|
open classical
theorem Ex009(a b c: Prop): ¬c → a ∨ ((a ∨ c) → b):=
assume H1:¬c ,
have A:¬(a ∨ ((a ∨ c) → b)) → false, from
(
assume H2:¬(a ∨ ((a ∨ c) → b)),
have B:(a ∨ c) → b, from
(
assume H3:a ∨ c,
show b , from or.elim H3
(
assume H4:a,
have D:a ∨ ((a ∨ c) → ... |
/-
Copyright (c) 2023 Heather Macbeth. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Heather Macbeth
-/
import Mathlib.Tactic.SolveByElim
register_label_attr ineq_rules
register_label_attr ineq_extra
register_label_attr mod_rules
register_label_attr mod_extra
reg... |
import data.nat.order.basic
-- Utility library for three maxes of ℕ
/-- maximum of three natural numbers. -/
def max3 (a b c : ℕ) : ℕ := max (max a b) c
theorem max3_mul_left (a b c d : ℕ) :
max3 (a * b) (a * c) (a * d) = a * max3 b c d :=
begin
-- This is hard: should I use `max_mul_of_nonneg`
-- or `max_mul_... |
\section{Contextual Rewriting}
Arbitrary extra contextual rewrites can be introduced by
using "congurence rules". These are theorems of a particular
shape.
The general form must be:
\begin{verbatim}
|- !x1 x1' ... xn xn'.
(!v11...v1m. x1 v11 ... v1m = x1' v11 ... v1m) ==>
(!v21...v2m. [P[x1,v21,...v2m] =... |
data _×_ (A B : Set) : Set where
_,_ : A → B → A × B
postulate
M : Set → Set
_>>=_ : ∀{A B : Set} → M A → (A → M B) → M B
infixr 1 bind
bind : _
bind = _>>=_
infix 0 id
id : ∀{A : Set} → A → A
id = λ x → x
syntax id x = do x
syntax bind ma (λ x → f) = x ← ma , f
swapM′ : ∀ {A B} → M (A × B) →... |
import Smt
theorem falsum : ¬False := by
smt
|
lemma cCons_0_Nil_eq [simp]: "0 ## [] = []" |
import tactic
import tactic.induction
import .base
lemma A_pw_1_not_hws : ¬A_hws 1 :=
begin
sorry
end |
lemma contractible_empty [simp]: "contractible {}" |
(*
Authors: Asta Halkjær From, Agnes Moesgård Eschen & Jørgen Villadsen, DTU Compute
*)
theory System_H1 imports System_L1 begin
text \<open>System H from David Hilbert: Die logischen Grundlagen der Mathematik (1922)\<close>
text \<open>Derivations are taken from: On Axiom Systems of Propositional Calculi. I
... |
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "src/Data/Complex/Compat.hs" #-}
{-# LANGUAGE CPP, NoImplicitPrelude #-}
module Data.Complex.Compat (
module Base
) where
import Data.Complex as Base
|
State Before: L : Language
M : Type w
inst✝¹ : Nonempty M
inst✝ : Structure L M
S : Substructure (Language.sum L (skolem₁ L)) M
⊢ IsElementary (↑(LHom.substructureReduct LHom.sumInl) S) State After: L : Language
M : Type w
inst✝¹ : Nonempty M
inst✝ : Structure L M
S : Substructure (Language.sum L (skolem₁ L)) M
⊢ ∀ (n ... |
useful-lemma : ∀ {a} {A : Set a} → A
useful-lemma = useful-lemma
|
From LF Require Export Logic.
From Coq Require Import Lia.
Module IndProp.
Set Warnings "-notation-overridden,-parsing,-deprecated-hint-without-locality".
(*
Definition ev (n : nat) : Prop := even n = true.
Defivition Ev (n : nat) : Prop := exists (x : nat), n = double x.
*)
Inductive ev : nat -> Prop :=
| ev_... |
import Smt
theorem disjunctive_syllogism (p q : Prop) : p ∨ q → ¬p → q := by
smt
|
(* Contribution to the Coq Library V6.3 (July 1999) *)
(****************************************************************************)
(* This contribution was updated for Coq V5.10 by the COQ workgroup. *)
(* January 1995 *)
(*****... |
-- Print a nat using well-founded recursion
def natPrintAux (n : Nat) (sink : List Char) : List Char :=
if h0 : n < 10
then (n.digitChar :: sink)
else natPrintAux (n / 10) (Nat.digitChar (n % 10) :: sink)
termination_by' measure (fun ⟨n, _⟩ => n)
decreasing_by sorry
-- I meant to write `simp only [natPrintAux]`,... |
Goal forall P Q, P <-> Q -> P -> Q.
Proof.
intros P Q H. Fail rewrite H.
Abort.
Require Import List.
Goal forall P Q, P <-> Q -> P -> Q.
Proof.
intros P Q H. rewrite H. easy.
Qed.
|
(* Require Export Field_theory. *)
Require Import ZArith.
Open Scope Z_scope.
Goal forall a b c : Z,
(a+b+c)^2 =
a * a + b^2 + c * c + 2 * a * b + 2 * a * c + 2 * b * c.
intros.
ring.
Qed. |
[STATEMENT]
lemma Limit_vid_on_in_Vset:
assumes "Limit \<alpha>" and "A \<in>\<^sub>\<circ> Vset \<alpha>"
shows "vid_on A \<in>\<^sub>\<circ> Vset \<alpha>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. vid_on A \<in>\<^sub>\<circ> Vset \<alpha>
[PROOF STEP]
by
(
rule vbrelation.vbrelation_Limit_in_V... |
/-
Copyright (c) 2022 Andrew Yang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
! This file was ported from Lean 3 source module algebraic_geometry.morphisms.quasi_separated
! leanprover-community/mathlib commit d39590fc8728fbf6743249802486f8c91ffe07bc
!... |
/-
Copyright (c) 2022 Jireh Loreaux. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Jireh Loreaux
! This file was ported from Lean 3 source module analysis.normed_space.star.spectrum
! leanprover-community/mathlib commit 1e3201306d4d9eb1fd54c60d7c4510ad5126f6f9
! Plea... |
{-# OPTIONS --without-K --safe --no-universe-polymorphism --sized-types
--no-guardedness --no-subtyping #-}
module Agda.Builtin.Size where
{-# BUILTIN SIZEUNIV SizeUniv #-}
{-# BUILTIN SIZE Size #-}
{-# BUILTIN SIZELT Size<_ #-}
{-# BUILTIN SIZESUC ↑_ #-}
{-# BUILTIN SIZEINF ∞ #... |
def f (x : Nat) (y : Nat := 1) (w : Nat := 2) (z : Nat) :=
x + y + w - z
theorem ex1 (x z : Nat) : f (z := z) x = x + 1 + 2 - z :=
rfl
theorem ex2 (x z : Nat) : f x (z := z) = x + 1 + 2 - z :=
rfl
theorem ex3 (x y : Nat) : f x y = fun z => x + y + 2 - z :=
rfl
theorem ex4 : f = (fun x z => x + 1 + 2 - z) :=
rfl
... |
lemma completion_upper: assumes A: "A \<in> sets (completion M)" obtains A' where "A \<subseteq> A'" "A' \<in> sets M" "A' - A \<in> null_sets (completion M)" "emeasure (completion M) A = emeasure M A'" |
theorem ex1 (x : Nat) (y : { v // v > x }) (z : Nat) : Nat :=
by {
clear y x;
exact z
}
theorem ex2 (x : Nat) (y : { v // v > x }) (z : Nat) : Nat :=
by {
clear x y;
exact z
}
theorem ex3 (x y z : Nat) (h₁ : x = y) (h₂ : z = y) : x = z :=
by {
have : y = z := h₂.symm;
apply Eq.trans;
exact h₁;
assumpt... |
/-
Copyright (c) 2021 Ashvni Narayanan. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ashvni Narayanan
-/
import norm_properties
import nat_properties
import misc
import number_theory.bernoulli_polynomials
/-!
# Theorems regarding sums of even characters
This file des... |
lemma contrapositive2 (P Q : Prop) : (¬ Q → ¬ P) → (P → Q) :=
begin
end |
informal statement Prove that the intersection of an arbitrary nonempty collection of normal subgroups of a group is a normal subgroup (do not assume the collection is countable).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 := |
** 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
* END DO statement (VMS).
program hb30
parameter (N = 7)
integer*2 i
integer j
intege... |
[STATEMENT]
lemma inversion_infty [simp]:
shows "inversion \<infinity>\<^sub>h = 0\<^sub>h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. inversion \<infinity>\<^sub>h = 0\<^sub>h
[PROOF STEP]
by (simp add: inversion_def) |
_ : (@0 Set → Set) → (@ω Set → Set)
_ = λ f → f
|
import tidy.forwards_reasoning
lemma G (n : ℕ) : list ℕ := [n]
lemma F : ℕ := 0
section
local attribute [forward] G
example : 1 = 1 :=
begin
success_if_fail { forwards_library_reasoning },
refl
end
local attribute [forward] F
example : 1 = 1 :=
begin
forwards_library_reasoning,
forwards_library_reasoning,... |
import Smt
theorem exists' : ∃ x : Nat, x = 1 := by
smt
exact ⟨1, rfl⟩
|
informal statement If $x$ and $g$ are elements of the group $G$, prove that $|x|=\left|g^{-1} x g\right|$.formal statement theorem exercise_1_1_25 {G : Type*} [group G]
(h : ∀ x : G, x ^ 2 = 1) : ∀ a b : G, a*b = b*a := |
/-
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_342
(a d: ℝ)
(h... |
{-# OPTIONS -Werror -WnoEmptyRewritePragma #-}
{-# REWRITE #-}
|
/-
Copyright (c) 2020 Aaron Anderson. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Aaron Anderson
-/
import ring_theory.int.basic
import data.nat.factorization.prime_pow
import algebra.squarefree
/-!
# Lemmas about squarefreeness of natural numbers
A number is squar... |
module PatternSyn where
data ⊤
: Set
where
tt
: ⊤
data D
(A : Set)
: Set
where
d
: A
→ A
→ D A
pattern p
= tt
pattern q
= tt
pattern _,_ x y
= d x y
f
: ⊤
→ ⊤
f p
= tt
g
: {A : Set}
→ D A
→ A
g (x , _)
= x
|
lemma bounded_empty [simp]: "bounded {}" |
State Before: α : Type ?u.638
k : ℕ
A : Finset ℕ
h₁ : ∀ {x : ℕ}, x ∈ A → x < k
⊢ Finset.sum A (Nat.pow 2) < 2 ^ k State After: α : Type ?u.638
k : ℕ
A : Finset ℕ
h₁ : ∀ {x : ℕ}, x ∈ A → x < k
⊢ ∑ x in range k, Nat.pow 2 x < 2 ^ k Tactic: apply lt_of_le_of_lt (sum_le_sum_of_subset fun t => mem_range.2 ∘ h₁) State Before... |
lemma interior_hyperplane [simp]: assumes "a \<noteq> 0" shows "interior {x. a \<bullet> x = b} = {}" |
import GMLInit.Meta.Prelude
theorem eqRec_eq_cast {α} {a b : α} {motive : (b : α) → a = b → Sort _} (t : motive a rfl) (h : a = b) : Eq.rec t h = cast (show motive a rfl = motive b h by cases h; rfl) t := by cases h; rfl
theorem eqNdrec_eq_cast {α} {a b : α} {motive : α → Sort _} (t : motive a) (h : a = b) : Eq.ndrec... |
import VISD.Binary
test : Syntax d Nat => d (Nat, Nat) Nat
test = (val 1) <*> item
<|> (val 2) <*> (val 3)
test2 : Syntax d Bool => d (Nat, Bool) Bool
test2 = (nat BE 4) <*> (val True)
<|> (nat BE 2) <*> (val False)
partial test3 : Syntax d Bool => d (Bool, List Nat) Bool
test3 = (val True) <*> ((ignore False... |
-- Copyright © 2019 François G. Dorais. All rights reserved.
-- Released under Apache 2.0 license as described in the file LICENSE.
theorem not_exists_of_forall_not {α : Sort*} {p : α → Prop} :
(∀ x, ¬ p x) → ¬ (∃ x, p x) := λ h ⟨x, hx⟩, h x hx
theorem not_exists_iff_forall_not {α : Sort*} (p : α → Prop) :
¬ (∃ x, p... |
import number_theory.sum_four_squares
lemma t019 : ∀ n : ℕ, ∃ a b c d : ℕ, a^2 + b^2 + c^2 + d^2 = n
:= nat.sum_four_squares
|
## takes in
## * data
## * filename
save( data, file = filename )
|
State Before: a : Code × ℕ
⊢ (rfindOpt fun b =>
evaln (((a, b).snd, (a, b).fst.fst), (a, b).fst.snd).fst.fst
(((a, b).snd, (a, b).fst.fst), (a, b).fst.snd).fst.snd (((a, b).snd, (a, b).fst.fst), (a, b).fst.snd).snd) =
eval a.fst a.snd State After: no goals Tactic: simp [eval_eq_rfindOpt] |
import category_theory.category
import category_theory.functor
import help_functions
import set_category.colimits.Coequalizer
import coalgebra.Coalgebra
import coalgebra.colimits.coalgebra_sum
import coalgebra.colimits.coalgebra_coequalizer
import set_category.colimits.Pushout
import set_category.colimits.Sum
import se... |
(*
Sous emacs, pour avoir les symboles il faut avoir une font adequat (par exemple: "Mono")
Pour taper les symboles utf8, il faut faire:
M-x set-input-method TeX
ensuite il suffit de taper la commande latex correspondante.
⊕ \oplus
⊗ \otimes
⊸ \multimap
⊤ \top
⊢ \vdash
*)
Require Import multiset_spec.
Require Impo... |
/-
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 ... |
/-
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_188
(σ : equiv ℝ ... |
section transport
universes u v
def eq.transport {A : Type u} (B : A → Type v) {a a' : A}
: a = a' → B a → B a' := by { intros, cases a_1, assumption, }
lemma heq_transport {A : Type u} (B : A → Type v) {a b : A} (p : a = b)
: ∀ b : B a, b == eq.transport B p b := by { intros, cases p, refl }
end transport
section ... |
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... |
/-
Copyright (c) 2021 Kalle Kytölä. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kalle Kytölä, Moritz Doll
! This file was ported from Lean 3 source module topology.algebra.module.weak_dual
! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a2159... |
[STATEMENT]
lemma pred_intros_finite[measurable (raw)]:
"finite I \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> pred M (\<lambda>x. x \<in> N x i)) \<Longrightarrow> pred M (\<lambda>x. x \<in> (\<Inter>i\<in>I. N x i))"
"finite I \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> pred M (\<lambda>x.... |
[STATEMENT]
theorem subst_lemma [simp]:
\<open>eval e f g (subst a t i) = eval (e\<langle>i:evalt e f t\<rangle>) f g a\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. eval e f g (a[t/i]) = eval (e\<langle>i:evalt e f t\<rangle>) f g a
[PROOF STEP]
by (induct a arbitrary: e i t) simp_all |
Require Export Basics.
Fixpoint ble_nat (n m : nat) : bool :=
match n with
| O => true
| S n' =>
match m with
| O => false
| S m' => ble_nat n' m'
end
end.
Fixpoint minus (n m:nat) : nat :=
match n, m with
| O , _ => O
| S _ , O => n
| S n', S m' => minus n' m'
end.
... |
/-
Copyright (c) 2022 Andrew Yang. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Andrew Yang
! This file was ported from Lean 3 source module ring_theory.ideal.minimal_prime
! leanprover-community/mathlib commit 70fd9563a21e7b963887c9360bd29b2393e6225a
! Please do no... |
import seminormed_rings
import ring_theory.adjoin.basic
--import field_theory.normal
open_locale nnreal
variables {R S : Type*} [comm_ring R] [comm_ring S] [algebra R S]
lemma is_pow_mult.restriction (A : subalgebra R S) {f : S → ℝ≥0} (hf_pm : is_pow_mult f) :
is_pow_mult (λ x : A, (f x.val)) :=
λ x n hn, by simpa... |
lemmas bounded_linear_const_scaleR = bounded_linear_scaleR_right[THEN bounded_linear_compose] |
example (x : ℕ) : x = x :=
begin
revert x,
intro y,
reflexivity
end
|
/-
Copyright (c) 2019 Amelia Livingston. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Amelia Livingston, Bryan Gin-ge Chen, Patrick Massot
! This file was ported from Lean 3 source module data.setoid.partition
! leanprover-community/mathlib commit 50832daea47b195a48... |
[STATEMENT]
theorem THEOREM1: "\<lfloor>\<^bold>\<forall>\<Phi>. \<P>(\<Phi>) \<^bold>\<rightarrow> \<^bold>\<diamond>(\<^bold>\<exists>x. \<Phi>(x))\<rfloor>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lfloor>\<lambda>w. \<forall>x. (\<P> x \<^bold>\<rightarrow> \<^bold>\<diamond>q4 x) w\<rfloor>
[PROOF STEP]... |
lemmas bounded_linear_scaleR_const = bounded_linear_scaleR_left[THEN bounded_linear_compose] |
lemma of_real_power_int [simp]: "of_real (power_int x n) = power_int (of_real x :: 'a :: {real_div_algebra,division_ring}) n" |
open import Relation.Binary.Core
module InsertSort.Impl2.Correctness.Order {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_) where
open import Data.List
open import Function using (_∘_)
open import InsertSort.Impl2 _≤_ tot≤
open import List.Sorted _≤_
open import OList _≤_
open imp... |
[STATEMENT]
lemma fields_Ext [simp]:
"fields (tprg, Ext) = [((vee, Ext ), PrimT Integer)] @ fields (tprg, Base)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. fields (tprg, Ext) = [((vee, Ext), PrimT Integer)] @ fields (tprg, Base)
[PROOF STEP]
apply (rule trans)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
... |
[STATEMENT]
lemma uniqueness_of_types_expr [rule_format (no_asm)]: "
(\<forall>E T1 T2. E\<turnstile>e :: T1 \<longrightarrow> E\<turnstile>e :: T2 \<longrightarrow> T1 = T2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<forall>E T1 T2. E \<turnstile> e :: T1 \<longrightarrow> E \<turnstile> e :: T2 \<longrigh... |
import data.mv_polynomial ring_theory.noetherian finsupp finset
open finsupp
namespace mv_polynomial
variables {σ : Type*} {α : Type*} [decidable_eq σ] [decidable_eq α]
/-section discrete_field
variables [discrete_field α]
theorem HBT : is_noetherian (mv_polynomial σ α) (mv_polynomial σ α) := sorry
lemma ideal_wf... |
State Before: α : Type ?u.959671
n : ℕ
⊢ ofInt' ↑(n + 1) = -ofInt' -[n+1] State After: no goals Tactic: simp only [ofInt', Num.zneg_toZNumNeg] State Before: α : Type ?u.959671
⊢ Num.toZNum (Num.ofNat' 0) = -Num.toZNum (Num.ofNat' 0) State After: α : Type ?u.959671
⊢ Num.toZNum 0 = -Num.toZNum 0 Tactic: rw [Num.ofNat'_z... |
module Specdris.SpecTest
import Specdris.Spec
import Specdris.TestUtil
testCase : IO ()
testCase
= do state <- specWithState $ do
describe "context 1" $ do
describe "context 1.1" $ do
it "context 1.1.1" $ do
1 === 2
1 === 1 ... |
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_4a
{α : Type} [metric_space α]
{β : Type} [metric_space β... |
@[simp] theorem one_le_of_lt (h: n < m) : 1 ≤ m := Nat.lt_of_le_of_lt (Nat.zero_le _) h
example (h: n < m) : 1 ≤ m := by
simp (disch := assumption) [h]
|
Formal statement is: lemma of_real_eq_id [simp]: "of_real = (id :: real \<Rightarrow> real)" Informal statement is: The function of_real is the identity function on the reals. |
variables (a b c d e : ℕ)
variable h1 : a = b
variable h2 : b = c + 1
variable h3 : c = d
variable h4 : e = 1 + d
include h1 h2 h3 h4
theorem T : a = e :=
calc
a = d + 1 : by rw [h1, h2, h3]
... = 1 + d : by rw add_comm
... = e : by rw h4
|
import
.lemmas.substitution
.lemmas.big_step
open env_big_step
lemma big_subst_sound {E e S r} :
big_subst E e ⟹ r
→ (E, compile e, S) ⟹ₙᵥ (E, r :: S) :=
begin
assume h,
induction' e,
case EVal {
rw compile,
rw big_subst_val at h,
cases' h,
apply ERunPush,
apply ERunEmpty
},
... |
theory Rudin
imports Complex_Main (* comment by Angeliki: switched to Complex_Main and imported some Analysis*)
"HOL-Analysis.Abstract_Euclidean_Space"
"HOL-Analysis.Derivative"
"HOL-Analysis.Interval_Integral"
"HOL-Analysis.Elementary_Topology"
(*"HOL-Hahn_Banach.Function_Order"*)
begin
(*
problem_number:1_1a
natur... |
(*
Authors: Asta Halkjær From, Agnes Moesgård Eschen & Jørgen Villadsen, DTU Compute
*)
theory System_F1 imports System_L3 begin
text \<open>System F from Gottlob Frege: Begriffsschrift (1879)\<close>
text \<open>Derivations are taken from: On Axiom Systems of Propositional Calculi. VII
... |
{-# OPTIONS --enable-prop #-}
data Squash {ℓ} (A : Set ℓ) : Prop ℓ where
squash : A → Squash A
squash-elim : ∀ {ℓ₁ ℓ₂} (A : Set ℓ₁) (P : Prop ℓ₂)
→ (A → P) → Squash A → P
squash-elim A P f (squash x) = f x
|
{-# OPTIONS --without-K #-}
module GroupoidStructure {a} {A : Set a} where
open import PathOperations
open import Types
p·p⁻¹ : {a b : A} (p : a ≡ b) → p · p ⁻¹ ≡ refl
p·p⁻¹ = J (λ _ _ p → p · p ⁻¹ ≡ refl) (λ _ → refl) _ _
p⁻¹·p : {a b : A} (p : a ≡ b) → p ⁻¹ · p ≡ refl
p⁻¹·p = J (λ _ _ p → p ⁻¹ · p ≡ refl) (λ _ → r... |
lemma zero_le (a : mynat) : 0 ≤ a :=
begin
use a,
rw zero_add,
refl,
end
|
theorem ex [Add α]
(assoc : {a b c : α} → a + b + c = a + (b + c))
(comm : {a b : α} → a + b = b + a)
(f : α → α) (x y z : α) : f (x + (y + z)) = f (y + (x + z)) := by
let leftAssoc {a b c : α} : a + (b + c) = b + (a + c) := by
rw [← assoc, comm (a := a), assoc]
simp [leftAs... |
theory exercise_2_2
imports Main
begin
(*set add function*)
fun add::"nat\<Rightarrow>nat\<Rightarrow>nat"
where
"add m 0 =m"|
"add m (Suc n)=Suc(add m n)"
(*set association*)
theorem add_assoc:"add x (add y z) =add (add x y) z"
apply(induction z)
apply(auto)
done
(*set add 0 x*)
lemma add_zero:"add 0 x=x"... |
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_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 := |
/-
In this file we will address how to deal with some examples from logic, namely and and or.
-/
/- Ignore this for now. But all imports are on the top of the file. -/
-- import tactic.suggest
/- Uncomment after reading the last note. -/
/- Prove that p ∧ q → p. It should be pretty straight-forward -/
theorem p_... |
/-
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
-/
import analysis.calculus.times_cont_diff
import analysis.complex.conformal
import analysis.calculus.conformal.normed_space
/-! # Real differentiabilit... |
/-
Copyright (c) 2020 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Kenny Lau
! This file was ported from Lean 3 source module number_theory.basic
! leanprover-community/mathlib commit 168ad7fc5d8173ad38be9767a22d50b8ecf1cd00
! Please ... |
section
variables (x y z : ℕ)
variables (h₁ : x = y) (h₂ : y = z)
section include_hs
include h₁ h₂
theorem foo : x = z :=
begin
rw [h₁, h₂]
end
end include_hs
end
|
open classical
variables { p q r : Prop }
theorem not_not_iff : ¬¬p ↔ p :=
⟨by_contradiction ∘ flip absurd, not_not_intro⟩
theorem imp_classical : p → q ↔ ¬ p ∨ q :=
⟨λh, by_cases (or.inr ∘ h) or.inl, λh h1, h.elim (absurd h1) id⟩
theorem not_and_iff_neg_or : ¬ (p ∧ q) ↔ (¬ p ∨ ¬ q) :=
by { split; intro h,
{ ... |
import init.data.set
import set_theory.cardinal.basic
open set
open_locale cardinal
theorem mk_le_of_surjective {α β : Type} {f : α → β}
(hf : function.surjective f) :
#α ≥ #β :=
begin
fsplit,
fsplit,
exact function.surj_inv hf,
exact function.injective_surj_inv hf,
end
theorem mk_le_of_injective {α β :... |
[STATEMENT]
lemma projs [simp]:
"\<pi>\<^sub>2(dsn, dsk, flag, hops, nhip, pre) = dsn"
"\<pi>\<^sub>3(dsn, dsk, flag, hops, nhip, pre) = dsk"
"\<pi>\<^sub>4(dsn, dsk, flag, hops, nhip, pre) = flag"
"\<pi>\<^sub>5(dsn, dsk, flag, hops, nhip, pre) = hops"
"\<pi>\<^sub>6(dsn, dsk, flag, hops, nhip, pre) = nhip"
... |
module PatternSynonymNoParse where
pattern f x = a b
|
lemma algebraic_int_of_real_iff [simp]: "algebraic_int (of_real x :: 'a :: {field_char_0, real_algebra_1}) \<longleftrightarrow> algebraic_int x" |
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 { unfold mk_symm, simp }
|
[STATEMENT]
lemma bl_of_nth_simps [simp, code]:
"bl_of_nth 0 f = []"
"bl_of_nth (Suc n) f = f n # bl_of_nth n f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. bl_of_nth 0 f = [] &&& bl_of_nth (Suc n) f = f n # bl_of_nth n f
[PROOF STEP]
by (simp_all add: bl_of_nth_def) |
lemma maze (P Q R S T U: Prop)
(p : P)
(h : P → Q)
(i : Q → R)
(j : Q → T)
(k : S → T)
(l : T → U)
: U :=
begin
have q := h(p),
have t := j(q),
have u := l(t),
exact u,
end |
--
set_option autoBoundImplicitLocal false
universe u
variable {α : Type u}
variable {β : α → Type v}
theorem ex {p₁ p₂ : Sigma (fun a => β a)} (h₁ : p₁.1 = p₂.1) (h : p₁.2 ≅ p₂.2) : p₁ = p₂ :=
match p₁, p₂, h₁, h with
| ⟨_, _⟩, ⟨_, _⟩, rfl, HEq.refl _ => rfl
|
[STATEMENT]
lemma even_odd_mirror_path_injective [simp]:
"even_mirror_path path = even_mirror_path path' \<longleftrightarrow> path = path'"
"odd_mirror_path path = odd_mirror_path path' \<longleftrightarrow> path = path'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (even_mirror_path path = even_mirror_path p... |
/-
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_51
(a b : ℝ)
(h... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.