text
stringlengths
0
3.34M
(* *) theory Dagstuhl imports "$HIPSTER_HOME/IsaHipster" begin (* Hard exercise *) fun qrev :: "'a list \<Rightarrow> 'a list \<Rightarrow> 'a list" where "qrev [] acc = acc" | "qrev (x#xs) acc = qrev xs (x#acc)" hipster rev qrev lemma lemma_a [thy_expl]: "qrev (qrev z y) [] = qrev y z" apply (induct...
universes u axiom elimEx (motive : Nat → Nat → Sort u) (x y : Nat) (diag : (a : Nat) → motive a a) (upper : (delta a : Nat) → motive a (a + delta.succ)) (lower : (delta a : Nat) → motive (a + delta.succ) a) : motive y x theorem ex1 (p q : Nat) : p ≤ q ∨ p > q := by cases p, q using elimEx with | lower d ...
10 * 15 20 - 10 # no error but unary minus here
[STATEMENT] lemma strip_guards_whileAnno [simp]: "strip_guards F (whileAnno b I V c) = whileAnno b I V (strip_guards F c)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. strip_guards F (whileAnno b I V c) = whileAnno b I V (strip_guards F c) [PROOF STEP] by (simp add: whileAnno_def while_def)
[STATEMENT] lemma word_add_def [code]: "a + b = word_of_int (uint a + uint b)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. a + b = word_of_int (uint a + uint b) [PROOF STEP] by transfer (simp add: take_bit_add)
import Scripts.set_theory --===================-- ------ TOPOLOGÍA ------ --===================-- -- Un espacio topológico sobre un tipo α viene dado por un predicado 'is_open' sobre los conjuntos de -- elementos de α junto con las pruebas de que ese predicado cumple los axiomas de la topología structure topological_s...
constants (p q : Prop) (Hnq : ¬q) (Hpq : p → q) theorem t (Hp : p): false := Hnq (Hpq Hp) check t -- t : p → false
theorem ex (h : a = 0) (p : Nat → Prop) : p a → p 0 := by simp_all
data Id (A : Set) : Set where wrap : A → Id A data Maybe (A : Set) : Set where nothing : Maybe A just : A → Maybe A maybe : {A : Set} {B : Maybe A → Set} → ((x : A) → B (just x)) → B nothing → (x : Maybe A) → B x maybe j n (just x) = j x maybe j n nothing = n record MaybeT (M : Set → Set) (A : Set...
import data.list.basic open list lemma foldr_ext {α : Type*} {β : Type*} {l : list α} (f f' : α → β → β) (s : β) (H : ∀ a ∈ l, ∀ b : β, f a b = f' a b) : foldr f s l = foldr f' s l := begin induction l with h l IH, {simp}, -- base case} simp *, suffices : foldr f s l = foldr f' s l, rw this, apply IH, i...
import tactic.induction tactic.linarith ...compiler ...semantics open vm_big_step env_big_step -- convert from environment-preserving to regular big_step lemma env_vm_big_step {env env' P S R} : (env, P, S) ⟹ₙᵥ (env', R) → (env, P, S) ⟹ᵥₘ R := begin assume hnv, induction' hnv, case ERunEmpty { ...
import Smt theorem comm (f : Bool → Bool → Bool) (p q : Bool) : f p q == f q p := by smt admit
(** Instance of identity on propositions *) Theorem not_False : ~ False. Proof. unfold not; trivial. Qed. Definition not_False' : ~ False := fun H => H. Theorem triple_neg : forall P:Prop, ~ ~ ~ P -> ~ P. Proof. auto. Qed. Theorem P3PQ : forall P Q:Prop, ~ ~ ~ P -> P -> Q. Proof. tauto. Qed. (** instance of t...
lemma coeffs_reflect_poly [code abstract]: "coeffs (reflect_poly p) = rev (dropWhile ((=) 0) (coeffs p))"
(** Some Neo-davidsonian Semantics*) Require Import Bvector. Require Import Coq.Lists.List. Require Import Omega. Load LibTactics. Ltac AUTO:= cbv delta;intuition;try repeat congruence; jauto;intuition. Parameter Event Ind LOcation Instrument:Set. Parameter Agent Theme: Ind->Event->Prop. Parameter Caesar Bru...
/-example : 1 + 2222 = 2223 := begin reflexivity end theorem foo : 1 + (2222222222222 : nat) = 2222222222223 := begin reflexivity end -/ theorem bar : 100003 + 100003 = 200006 := rfl
/- 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_234 (d : ℝ) (h₀...
-- set_option autoBoundImplicitLocal false universes 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
lemma (in algebra) sets_Collect_finite_All: assumes "\<And>i. i \<in> S \<Longrightarrow> {x\<in>\<Omega>. P i x} \<in> M" "finite S" shows "{x\<in>\<Omega>. \<forall>i\<in>S. P i x} \<in> M"
informal statement Prove that a subgroup $H$ of $G$ is normal if and only if $[G, H] \leq H$.formal statement theorem exercise_7_1_11 {R : Type*} [ring R] [is_domain R] {x : R} (hx : x^2 = 1) : x = 1 ∨ x = -1 :=
import data.complex.basic import number_theory.divisors theorem AMC_2021_A_25 (N:ℕ)(f:ℕ → ℝ)(h:∀(n:ℕ), f n = (finset.card (nat.divisors n))/(n^(1/3)))(hN:∀(n:ℕ),n≠N → (f N > f n)): N=2520 := begin sorry end
/- 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...
-- -- The Computer Language Benchmarks Game -- https://salsa.debian.org/benchmarksgame-team/benchmarksgame/ -- -- Contributed by Don Stewart -- *reset* -- -- import System.Environment import Data.Bits -- import Text.Printf -- -- an artificially strict tree. -- -- normally you would ensure the branches are lazy, but t...
import topology.instances.real import data.complex.exponential import data.real.irrational open filter real open_locale topological_space open_locale big_operators noncomputable def e : ℕ → ℝ := λ n, ∑ i in finset.range(n+1), 1 / (nat.factorial i) theorem part_a (n : ℕ) : ∃ p : ℕ, e n = p / (nat.factorial n) :=...
module Figures using AverageShiftedHistograms, Distributions, Plots gr() # sz = 1000 # o = ash(rand(Gamma(5, 1), sz), rng=0:.05:20, m = 15) # anim = @animate for i in 1:50 # plot(o, title = "Nobs = $(sz * i)", ylim = (0, .5)) # ash!(o, rand(Gamma(5, 1), sz)) # end # gif(anim, "animation.gif", fps = 10) # ...
import Mathlib import LeanAide /-! ## A bit of AI We use `leanaide` for a bit of AI. For more direct use (such as debugging), can use ```lean #eval translateViewM "There are infinitely many odd numbers" ``` For more details on using the AI, please see the [README](https://github.com/siddhartha-gadgil/LeanAide#readm...
theory Ex045 imports Main begin theorem "C \<longrightarrow> \<not>A \<or> ((B \<or> C) \<longrightarrow> A)" proof - { assume C { assume "\<not>(\<not>A \<or> ((B \<or> C) \<longrightarrow> A))" { assume A { assume "B \<or> C" from \<open>A\<close> hav...
(* Title: Containers/Set_Impl.thy Author: Andreas Lochbihler, KIT René Thiemann, UIBK *) theory Set_Impl imports Collection_Enum DList_Set RBT_Set2 Closure_Set Containers_Generator Complex_Main begin section \<open>Different implementations of sets\<close> subsection \<open>...
import game.world7.level6 -- hide /- # Advanced proposition world. ## Level 7: `or_symm` Proving that $(P\lor Q)\implies(Q\lor P)$ involves an element of danger. `intro h,` is the obvious start. But now, even though the goal is an `∨` statement, both `left` and `right` put you in a situation with an impossible goal...
import m114 algebra.pi_instances rename_var lemma abs_inferieur_ssi (x y : ℝ) : |x| ≤ y ↔ -y ≤ x ∧ x ≤ y := abs_le variables {α : Type*} [decidable_linear_order α] lemma superieur_max_ssi (p q r : α) : r ≥ max p q ↔ r ≥ p ∧ r ≥ q := max_le_iff lemma inferieur_max_gauche (p q : α) : p ≤ max p q := le_max_left _ _ l...
/- 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 imo_1961_p1 (x y z a b : ℝ) (...
lemma homeomorphism_empty [simp]: "homeomorphism {} {} f g"
theorem easy (P Q : Prop) (HP : P) (HPQ : P → Q) : Q := begin sorry end
set_option pp.analyze false def p (x y : Nat) := x = y example (x y : Nat) : p (x + y) (y + x + 0) := by conv => whnf congr . skip . whnf; skip trace_state rw [Nat.add_comm] rfl example (x y : Nat) : p (x + y) (y + x + 0) := by conv => whnf rhs whnf trace_state rw [Nat.add_c...
lemma both_and (P Q : Prop) (p : P) (q : Q) : P ∧ Q := begin split, { exact p, }, { exact q, }, end
def f (x y : Nat) := x + 2*y namespace Foo local infix:65 (priority := high) "+" => f theorem ex1 (x y : Nat) : x + y = f x y := rfl #check 1 + 2 end Foo #check 1 + 2 theorem ex2 (x y : Nat) : x + y = HAdd.hAdd x y := rfl open Foo theorem ex3 (x y : Nat) : x + y = HAdd.hAdd x y := rfl #check 1 + 2 section def ...
@[default_instance] instance : Pow Int Nat where pow m n := m ^ n instance : @Trans Int Int Int (· < ·) (· < ·) (· < ·) where trans := sorry example {n : Int} : n ^ 2 < 1 := calc n ^ 2 < 1 ^ 2 := sorry _ < 1 := sorry
[GOAL] S : Set ℍ ⊢ S ∈ atImInfty ↔ ∃ A, ∀ (z : ℍ), A ≤ im z → z ∈ S [PROOFSTEP] simp only [atImInfty_basis.mem_iff, true_and] [GOAL] S : Set ℍ ⊢ (∃ i, im ⁻¹' Set.Ici i ⊆ S) ↔ ∃ A, ∀ (z : ℍ), A ≤ im z → z ∈ S [PROOFSTEP] rfl [GOAL] f g : ℍ → ℂ hf : IsBoundedAtImInfty f hg : IsBoundedAtImInfty g ⊢ IsBoundedAtImInfty (f *...
universe u def f {α : Type u} [BEq α] (xs : List α) (y : α) : α := do for x in xs do if x == y then return x return y structure S := (key val : Nat) instance : BEq S := ⟨fun a b => a.key == b.key⟩ theorem ex1 : f (α := S) [⟨1, 2⟩, ⟨3, 4⟩, ⟨5, 6⟩] ⟨3, 0⟩ = ⟨3, 4⟩ := rfl theorem ex2 : f (α := S) [⟨1, 2⟩, ⟨3, ...
lemmas continuous_Im [simp] = bounded_linear.continuous [OF bounded_linear_Im]
theory deMorgan1 imports Main begin text\<open> Apply style \<close> theorem de_morgan_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) apply (erul...
/- Copyright © 2018 François G. Dorais. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. -/ import fin.choice import .basic .subst .mod .prf universe u variables {σ : Type u} {sig : σ → ℕ} {I : Type*} (ax : I → eqn sig) include sig ax lemma proof.sound {α : Type*} (a : alg sig...
[STATEMENT] theorem terminates_iff_terminates_merge_guards: "\<Gamma>\<turnstile>c\<down> s = \<Gamma>\<turnstile>merge_guards c\<down> s" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<Gamma>\<turnstile>c \<down> s = \<Gamma>\<turnstile>merge_guards c \<down> s [PROOF STEP] by (iprover intro: terminates_to_term...
(* *********************************************************************) (* *) (* The CertiKOS Certified Kit Operating System *) (* *) (* The...
import algebra.group algebra.group_power variables {G: Type*} (a b : G) theorem Q_24 [group G] (H1 : ∀ a b : G, (a * b)^3 = a^3 * b^3) (H2 : ∀ x : G, x^3 = 1 → x = 1) : ∀ a b : G, a * b = b * a := λ a b : G, have Lem1 : ∀ x y : G, (y * x)^2 = x^2 * y^2, from λ x y : G, have H10 : (a * b) * (a * b) * (a *...
my_f(x,y) = 2x + y my_derivative(x,y) = ForwardDiff.derivative(x->my_f(x,y),x)
theory Scratch imports Main begin lemma a: assumes "A" assumes "B" shows "A \<and> B \<Longrightarrow> True" using [[simp_trace]] apply auto done end
/- Copyright (c) 2020 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import field_theory.splitting_field import field_theory.perfect_closure import field_theory.separable /-! # Algebraically Closed Field In this file we define the typeclass f...
example : 2 + 3 = 5 := begin generalize h : 3 = x, rw ←h end
[GOAL] ⊢ ∀ (x y : ZMod 4), OneHom.toFun { toFun := ![0, 1, 0, -1], map_one' := (_ : Matrix.vecCons 0 ![1, 0, -1] 1 = Matrix.vecCons 0 ![1, 0, -1] 1) } (x * y) = OneHom.toFun { toFun := ![0, 1, 0, -1], map_one' := (_ : Matrix.vecCons 0 ![1, 0, -1] 1 = Matrix.vecCons 0 ![1, 0, -1] 1) }...
%% Copyright (C) 2014, 2016 Colin B. Macdonald %% %% This file is part of OctSymPy. %% %% OctSymPy is free software; you can redistribute it and/or modify %% it under the terms of the GNU General Public License as published %% by the Free Software Foundation; either version 3 of the License, %% or (at your option) any ...
/- This type bundles together a value of a certain type together with a proof that it satisfies a certain property. It can be used to write algorithms that return values that must satisfy certain defining properties. -/ @[class] structure Prover {α : Type _} (p : α → Prop) := value : α proof : p value -...
import unitb.decomposition.component universe variables u namespace decomposition section open predicate unitb function scheduling parameter {α : Type} parameter {t : Type} parameter [sched t] parameter {s : t → program α} parameter {s₀ : α} parameter (asm : α → α → Prop) parameter (h₀ : ∀ i, (s i).mch.first s₀) ...
lemma synthetic_div_0 [simp]: "synthetic_div 0 c = 0"
import data.nat.basic def is_even (a : nat) := ∃ b, a = 2 * b theorem even_plus_even {a b : nat} (h1 : is_even a) (h2 : is_even b) : is_even (a + b) := exists.elim h1 (assume w1, assume hw1 : a = 2 * w1, exists.elim h2 (assume w2, assume hw2 : b = 2 * w2, exists.intro (w1 + w2) (calc a + b = 2...
import data.list algebra.ring tactic.omega defs lemma single_complete: almost_complete [●] := begin apply almost_complete.cmp_rule, existsi ([]), intros t h, exfalso, apply h, apply grow_list.head_grow, apply grow.single_grow end lemma single_grow : ∀ t : bintree, (t ↣ ●) → t = ● := begin intros t ...
informal statement Let $G=\left\{g_{1}, \ldots, g_{n}\right\}$ be a finite group. Prove that the element $N=g_{1}+g_{2}+\ldots+g_{n}$ is in the center of the group ring $R G$.formal statement theorem exercise_7_3_37 {R : Type*} {p m : ℕ} (hp : p.prime) (N : ideal $ zmod $ p^m) : is_nilpotent N ↔ is_nilpotent (id...
Formal statement is: lemma closure_empty [simp]: "closure {} = {}" Informal statement is: The closure of the empty set is the empty set.
module Examples import Data.Vect import ProcessLib import Proto import HoriComp import VertComp import Primitives import SumWire import Dualise import SumWire import CupCap import Util %flag C "-O3" gt5: Hom [Down Int] [Down Int, Down Int] gt5 = mkPure "gt5: " (\n => if n > 5 then Left n else Right n) -*- splitEithe...
import Smt theorem verum : true := by smt simp_all
(* Authors: Asta Halkjær From, Agnes Moesgård Eschen & Jørgen Villadsen, DTU Compute *) theory LT1 imports System_L1 begin text \<open>System from Jan Lukasiewicz and Alfred Tarski (1930): Untersuchungen über den Aussagenkalkül\<close> text \<open>Inspired by Shotaro Tanaka (1965): On Axiom Systems of Propositiona...
[STATEMENT] lemma iNext_iEx_iff_singleton : "(\<circle> t t0 I. P t) = (\<diamond> t {inext t0 I}. P t)" and iLast_iEx_iff_singleton : "(\<ominus> t t0 I. P t) = (\<diamond> t {iprev t0 I}. P t)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. iNext t0 I P = (\<diamond> t {inext t0 I}. P t) &&& iLast t0 I P ...
lemma to_fract_eq_0_iff [simp]: "to_fract x = 0 \<longleftrightarrow> x = 0"
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Joey van Langen, Casper Putz -/ import tactic.apply_fun import data.equiv.ring import data.zmod.basic import linear_algebra.basis import ring_theory.integral_domain import ...
/- Copyright (c) 2022 Jireh Loreaux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jireh Loreaux -/ import analysis.normed_space.star.basic import analysis.normed_space.spectrum import analysis.normed_space.star.exponential import analysis.special_functions.exponentia...
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]
informal statement Let $X$ be a compact Hausdorff space. Let $\mathcal{A}$ be a collection of closed connected subsets of $X$ that is simply ordered by proper inclusion. Then $Y=\bigcap_{A \in \mathcal{A}} A$ is connected.formal statement theorem exercise_27_4 {X : Type*} [metric_space X] [connected_space X] (hX : ∃ ...
import SciLean.Algebra import SciLean.Quot.Monomial namespace SciLean namespace Algebra -- M monomials -- K ring inductive Repr (M K X : Type u) : Type u where | mon (m : M) : Repr M K X | add (x y : Repr M K X) : Repr M K X | mul (x y : Repr M K X) : Repr M K X | lmul (c : K) (x : Repr M K X) : Rep...
Formal statement is: lemma two_is_prime_nat [simp]: "prime (2::nat)" Informal statement is: The number 2 is prime.
{- This example goes through now that we allow instantiation of blocked terms #-} module Issue439 where record Σ (A : Set) (B : A → Set) : Set where constructor _,_ field p₁ : A p₂ : B p₁ open Σ record ⊤ : Set where data Tree : Set where leaf : Tree node : Tree → Tree → Tree mutual U : Tree → Set U...
def p (x : Nat := 0) : Nat × Nat := (x, x) theorem ex1 : p.1 = 0 := rfl theorem ex2 : (p (x := 1) |>.2) = 1 := rfl def c {α : Type} [Inhabited α] : α × α := (default, default) theorem ex3 {α} [Inhabited α] : c.1 = default (α := α) := rfl theorem ex4 {α} [Inhabited α] : c.2 = default (α := α) := rfl
[STATEMENT] lemma orthogonal_complement_antimono_iff[simp]: fixes A B :: \<open>('a::chilbert_space) set\<close> assumes \<open>closed_csubspace A\<close> and \<open>closed_csubspace B\<close> shows \<open>orthogonal_complement A \<subseteq> orthogonal_complement B \<longleftrightarrow> A \<supseteq> B\<close> ...
State Before: ⊢ ord ∘ aleph = enumOrd {b | ord (card b) = b ∧ ω ≤ b} State After: ⊢ StrictMono (ord ∘ aleph) ∧ range (ord ∘ aleph) = {b | ord (card b) = b ∧ ω ≤ b} Tactic: rw [← eq_enumOrd _ ord_card_unbounded'] State Before: ⊢ StrictMono (ord ∘ aleph) ∧ range (ord ∘ aleph) = {b | ord (card b) = b ∧ ω ≤ b} State After:...
[STATEMENT] lemma currentLevelPrefixToLevel_aux: assumes "l \<ge> i" shows "currentLevel (prefixToLevel_aux M l i) <= l - i" [PROOF STATE] proof (prove) goal (1 subgoal): 1. currentLevel (prefixToLevel_aux M l i) \<le> l - i [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: i \<le> l goal (1 subgo...
[GOAL] x y : Path PUnit.unit PUnit.unit ⊢ x = y [PROOFSTEP] ext [GOAL] x y : FundamentalGroupoid PUnit ⊢ Subsingleton (x ⟶ y) [PROOFSTEP] convert_to Subsingleton (Path.Homotopic.Quotient PUnit.unit PUnit.unit) [GOAL] x y : FundamentalGroupoid PUnit ⊢ Subsingleton (Path.Homotopic.Quotient PUnit.unit PUnit.unit) [PROOFST...
corollary fps_coeff_residues_bigo': fixes f :: "complex \<Rightarrow> complex" and r :: real assumes exp: "f has_fps_expansion F" assumes "open A" "connected A" "cball 0 r \<subseteq> A" "r > 0" assumes "f holomorphic_on A - S" "S \<subseteq> ball 0 r" "finite S" "0 \<notin> S" assumes "eventually (\<lambda>n. g n = -(...
State Before: m : Type u_1 → Type u_2 α : Type u_3 β : Type u_1 inst✝¹ : Monad m inst✝ : LawfulMonad m f : α → m β l : List α ⊢ mapM' f l = mapM f l State After: no goals Tactic: simp [go, mapM] State Before: m : Type u_1 → Type u_2 α : Type u_3 β : Type u_1 inst✝¹ : Monad m inst✝ : LawfulMonad m f : α → m β l : List α...
/-- From Sets to Relations Take-away message. Whereas we represent a set as a one-place predicate, we will represent a binary relation as a two-place predicate. Just as a set is a collection of individual objects that satisfy a predicate, a relation is a set of *pairs* of objects, each of which satisfies the pair mem...
import tactic -- True or false? n = 3 ↔ n^2-2n-3=0. If you think it's false -- then you'll have to modify the statement by putting it in brackets -- and adding a ¬ in front of it. lemma part_a : ∀ n : ℤ, n = 3 → n ^ 2 - 2 * n - 3 = 0 := begin norm_num, end lemma part_b : ¬ (∀ n : ℤ, n ^ 2 - 2 * n - 3 = 0 → n = 3) ...
(* Benedikt Ahrens and Régis Spadotti Terminal semantics for codata types in intensional Martin-Löf type theory http://arxiv.org/abs/1401.1053 *) (* Content of this file: - definition of pushforward of comodules along a comonad morphism - definition of comodule morphism induced by a comonad morphi...
State Before: p : ℕ q : ℚ hq : q = 0 ⊢ padicNorm p (-q) = padicNorm p q State After: no goals Tactic: simp [hq] State Before: p : ℕ q : ℚ hq : ¬q = 0 ⊢ padicNorm p (-q) = padicNorm p q State After: no goals Tactic: simp [padicNorm, hq]
/- 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_142 (m b : ℝ) (...
[STATEMENT] lemma defined_Integer_simps [simp]: "defined (MkI\<cdot>i)" "defined (0::Integer)" "defined (1::Integer)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. defined (MkI\<cdot>i) &&& defined 0 &&& defined 1 [PROOF STEP] by (simp_all add: defined_def)
lemma is_unit_content_iff [simp]: "is_unit (content p) \<longleftrightarrow> content p = 1"
/- Copyright (c) 2014 Jeremy Avigad. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jeremy Avigad, Leonardo de Moura Definitions and properties of gcd, lcm, and coprime. -/ import .div data.nat.gcd open eq.ops namespace int /- gcd -/ definition gcd (a b : ℤ) : ℤ :=...
import algebra.big_operators.basic import data.int.gcd import data.real.basic import data.finset.basic import number_theory.divisors #check int.lcm 42 47 open_locale big_operators theorem AIME_2021_I_14 (n1:ℕ)(sigma:ℕ → ℕ )(hs:∀(n:pnat), sigma n = ∑ i in nat.divisors n, i) (h:∀ (a:pnat),2021∈ nat.divisors (sigma (a^n...
(** * Facts about Static Expressions *) Require Import hvhdl.Environment. Require Import hvhdl.StaticExpressions. Require Import hvhdl.AbstractSyntax. Require Import hvhdl.SemanticalDomains. Require Import hvhdl.proofs.EnvironmentFacts. (** ** Facts about Locally Static Expressions *) Section LStatic. End LStatic....
function [fit] = compare_new(varargin) % Determine list of inputs. inpn = cell(1, length(varargin)); for kn = 1:length(varargin); inpn{kn} = inputname(kn); end v = {varargin{:} inpn}; th = idss(v{2}); th = th('y1', cell(0)); z = v{1}; z = iddata(z(:, 1), z(:, 2:end), 1); y = pvget(z, 'OutputData'); z1 = z(:, 'y1...
import data.list.basic open list 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] section local attribute [simp] reverse_mk_symm example (xs ys : list ℕ) : reverse ...
import data.real.basic import game.functions.bothInjective game.functions.bothSurjective open function /- # Chapter 6 : Functions ## Level 3 Be sure to make use of the results in the previous two levels. -/ /- Lemma If $f : X \to Y$ and $g : Y \to Z$ are both bijective functions, then the function resulting from th...
theory Exercise2 imports Main begin inductive palindrome :: "'a list \<Rightarrow> bool" where pdrmNil: "palindrome []" | pdrmSing: "palindrome [x]" | pdrmRec: "palindrome xs \<Longrightarrow> palindrome (x # xs @ [x])" theorem "(palindrome xs) \<Longrightarrow> (rev xs = xs)" apply (induction rule: palindrome....
[STATEMENT] lemma list_of_lazy_sequence_append [simp]: "list_of_lazy_sequence (append xq yq) = list_of_lazy_sequence xq @ list_of_lazy_sequence yq" [PROOF STATE] proof (prove) goal (1 subgoal): 1. list_of_lazy_sequence (Lazy_Sequence.append xq yq) = list_of_lazy_sequence xq @ list_of_lazy_sequence yq [PROOF STEP] by...
[STATEMENT] lemma assert_gpv_simps [simp]: "assert_gpv True = Done ()" "assert_gpv False = Fail" [PROOF STATE] proof (prove) goal (1 subgoal): 1. assert_gpv True = Generative_Probabilistic_Value.Done () &&& assert_gpv False = Fail [PROOF STEP] by(simp_all add: assert_gpv_def)
From Coq Require Import List ssreflect . From ExtensibleCompiler.Theory Require Import Algebra Environment Eval Functor ProgramAlgebra SubFunctor Sum1 Types UniversalProperty . Local Open Scope SubFunctor. Inductive Closure L `{F : forall V, ...
subsection \<open>Implementation of Division on Multivariate Polynomials\<close> theory MPoly_Divide_Code imports MPoly_Divide Polynomials.MPoly_Type_Class_FMap Polynomials.MPoly_Type_Univariate begin text \<open> We now set up code equations for some of the operations that we will need, such as div...
lemma succ_le_succ (a b : mynat) (h : a ≤ b) : succ a ≤ succ b := begin cases h with c hc, use c, rwa [hc, succ_add], end
import linear_algebra.finite_dimensional import missing_mathlib.linear_algebra.dimension universes u v v' w open_locale classical open vector_space cardinal submodule module function variables {K : Type u} {V : Type v} [field K] [add_comm_group V] [vector_space K V] {V₂ : Type v'} [add_comm_group V₂] [vector_space K...
Formal statement is: lemma emeasure_lfp'[consumes 1, case_names cont measurable]: assumes "P M" assumes cont: "sup_continuous F" assumes *: "\<And>M A. P M \<Longrightarrow> (\<And>N. P N \<Longrightarrow> Measurable.pred N A) \<Longrightarrow> Measurable.pred M (F A)" shows "emeasure M {x\<in>space M. lfp F x} = (SUP ...
write (*,*) ! !"AA" end
variables p q : Prop theorem t1 : p → q → p := λ (hp : p) (hq : q), hp