path
stringlengths
11
71
content
stringlengths
75
124k
Tactic\Rify.lean
/- Copyright (c) 2023 Patrick Massot. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Moritz Doll, Mario Carneiro, Robert Y. Lewis, Patrick Massot -/ import Mathlib.Data.Rat.Cast.Order import Mathlib.Data.Real.Basic import Mathlib.Tactic.Qify /-! # `rify` tactic The `...
Tactic\Ring.lean
import Mathlib.Tactic.Ring.Basic import Mathlib.Tactic.Ring.RingNF import Mathlib.Tactic.Ring.PNat
Tactic\RSuffices.lean
/- Copyright (c) 2022 Moritz Doll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Moritz Doll -/ import Mathlib.Tactic.Basic /-! # `rsuffices` tactic The `rsuffices` tactic is an alternative version of `suffices`, that allows the usage of any syntax that would be val...
Tactic\Says.lean
/- Copyright (c) 2023 Kim Liesinger. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kim Liesinger -/ import Batteries.Data.String.Basic import Lean.Meta.Tactic.TryThis import Batteries.Linter.UnreachableTactic import Qq.Match /-! # The `says` tactic combinator. If yo...
Tactic\ScopedNS.lean
/- Copyright (c) 2021 Gabriel Ebner. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gabriel Ebner, Mario Carneiro -/ import Mathlib.Util.WithWeakNamespace /-! # `scoped[NS]` syntax This is a replacement for the `localized` command in mathlib. It is similar to `scoped...
Tactic\Set.lean
/- Copyright (c) 2022 Ian Benway. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Ian Benway -/ import Lean /-! # The `set` tactic This file defines the `set` tactic and its variant `set!`. `set a := t with h` is a variant of `let a := t`. It adds the hypothesis `h :...
Tactic\SetLike.lean
/- Copyright (c) 2023 Jireh Loreaux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jireh Loreaux -/ import Aesop /-! # SetLike Rule Set This module defines the `SetLike` Aesop rule set which is used by the `SetLike` tactic. Aesop rule sets only become visible once ...
Tactic\SimpIntro.lean
/- Copyright (c) 2022 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Lean /-! # `simp_intro` tactic -/ namespace Mathlib.Tactic open Lean Meta Elab Tactic /-- Main loop of the `simp_intro` tactic. * `g`: the original goal * `...
Tactic\SimpRw.lean
/- Copyright (c) 2020 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Mario Carneiro, Alex J. Best -/ import Lean /-! # The `simp_rw` tactic This file defines the `simp_rw` tactic: it functions as a mix of `simp` and `rw`. Like `rw`, it appl...
Tactic\SlimCheck.lean
/- Copyright (c) 2020 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Simon Hudon, Scott Morrison -/ import Mathlib.Testing.SlimCheck.Testable import Qq /-! ## Finding counterexamples automatically using `slim_check` A proposition can be tested by writin...
Tactic\SplitIfs.lean
/- Copyright (c) 2018 Gabriel Ebner. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gabriel Ebner, David Renshaw -/ import Lean import Mathlib.Tactic.Core /-! Tactic to split if-then-else expressions. -/ namespace Mathlib.Tactic open Lean Elab.Tactic Parser.Tactic L...
Tactic\Spread.lean
/- Copyright (c) 2021 Gabriel Ebner. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gabriel Ebner -/ import Lean.Elab.Binders /-! # Macro for spread syntax (`__ := instSomething`) in structures. -/ open Lean Parser.Term Macro /- This adds support for structure insta...
Tactic\Subsingleton.lean
/- Copyright (c) 2024 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import Mathlib.Logic.Basic /-! # `subsingleton` tactic The `subsingleton` tactic closes `Eq` or `HEq` goals using an argument that the types involved are subsingletons. T...
Tactic\Substs.lean
/- Copyright (c) 2022 Evan Lohn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Evan Lohn, Mario Carneiro -/ import Lean /-! # The `substs` macro The `substs` macro applies the `subst` tactic to a list of hypothesis, in left to right order. -/ namespace Mathlib.Tact...
Tactic\SuccessIfFailWithMsg.lean
/- Copyright (c) 2017 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Simon Hudon, SΓ©bastien GouΓ«zel, Scott Morrison, Thomas Murrills -/ import Lean /-! # Success If Fail With Message This file implements a tactic that succeeds only if ...
Tactic\SudoSetOption.lean
/- Copyright (c) 2021 Gabriel Ebner. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Gabriel Ebner -/ import Lean.Elab.ElabRules /-! # Defines the `sudo set_option` command. Allows setting undeclared options. -/ open Lean Elab private def setOption {m : Type β†’ Type}...
Tactic\SuppressCompilation.lean
/- Copyright (c) 2023 SΓ©bastien GouΓ«zel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex J. Best, Mac Malone -/ import Lean.Elab.Declaration import Lean.Elab.Notation /-! # Supressing compilation to executable code in a file or in a section Currently, the compile...
Tactic\SwapVar.lean
/- Copyright (c) 2022 Arthur Paulino. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arthur Paulino -/ import Lean.Elab.ElabRules import Mathlib.Util.Tactic /-! # Defines the `swap_var` tactic Swap the names of two hypotheses. -/ open Lean Meta Elab.Tactic namespac...
Tactic\Tauto.lean
/- Copyright (c) 2018 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Simon Hudon, David Renshaw -/ import Mathlib.Tactic.CasesM import Mathlib.Tactic.Core import Mathlib.Lean.Elab.Tactic.Basic import Mathlib.Logic.Basic import Qq import Batteries.Tactic.Cl...
Tactic\TermCongr.lean
/- Copyright (c) 2023 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import Mathlib.Lean.Expr.Basic import Mathlib.Lean.Meta.CongrTheorems import Mathlib.Logic.Basic import Mathlib.Tactic.CongrExclamation /-! # `congr(...)` congruence quota...
Tactic\TFAE.lean
/- Copyright (c) 2018 Johan Commelin. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johan Commelin, Reid Barton, Simon Hudon, Thomas Murrills, Mario Carneiro -/ import Qq import Mathlib.Data.Nat.Notation import Mathlib.Util.AtomM import Mathlib.Data.List.TFAE /-! # T...
Tactic\ToAdditive.lean
/- Copyright (c) 2024 Miyahara Kō. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Miyahara Kō -/ import Mathlib.Tactic.ToAdditive.Frontend /-! ## `@[to_additive]` attributes for basic types -/ attribute [to_additive Empty] Empty attribute [to_additive PEmpty] PEmpty ...
Tactic\ToExpr.lean
/- Copyright (c) 2023 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import Mathlib.Tactic.DeriveToExpr import Mathlib.Util.WhatsNew /-! # `ToExpr` instances for Mathlib This module should be imported by any module that intends to define `...
Tactic\ToLevel.lean
/- Copyright (c) 2023 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import Mathlib.Tactic.PPWithUniv /-! # `ToLevel` class This module defines `Lean.ToLevel`, which is the `Lean.Level` analogue to `Lean.ToExpr`. **Warning:** Import `Math...
Tactic\Trace.lean
/- Copyright (c) 2022 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Lean.Elab.Tactic.ElabTerm import Lean.Meta.Eval /-! # Defines the `trace` tactic. -/ open Lean Meta Elab Tactic /-- Evaluates a term to a string (when possi...
Tactic\TryThis.lean
/- Copyright (c) 2024 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Lean /-! # 'Try this' tactic macro This is a convenient shorthand intended for macro authors to be able to generate "Try this" recommendations. (It is not th...
Tactic\TypeCheck.lean
/- Copyright (c) 2022 Jireh Loreaux. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jireh Loreaux -/ import Lean.Elab.Tactic.Basic import Lean.Elab.SyntheticMVars /-! # The `type_check` tactic Define the `type_check` tactic: it type checks a given expression, and trac...
Tactic\TypeStar.lean
/- Copyright (c) 2023 Matthew Ballard. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Matthew Ballard -/ import Lean.Elab.Term /-! # Support for `Sort*` and `Type*`. These elaborate as `Sort u` and `Type u` with a fresh implicit universe variable `u`. -/ open Lean ...
Tactic\UnsetOption.lean
/- Copyright (c) 2022 Alex J. Best. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Alex J. Best -/ import Lean.Parser.Term import Lean.Parser.Do import Lean.Elab.Command /-! # The `unset_option` command This file defines an `unset_option` user command, which unsets u...
Tactic\Use.lean
/- Copyright (c) 2022 Arthur Paulino. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arthur Paulino, Gabriel Ebner, Kyle Miller -/ import Lean.Meta.Tactic.Util import Lean.Elab.Tactic.Basic /-! # The `use` tactic The `use` and `use!` tactics are for instantiating one...
Tactic\Variable.lean
/- Copyright (c) 2023 Kyle Miller. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kyle Miller -/ import Lean.Meta.Tactic.TryThis /-! # The `variable?` command This defines a command like `variable` that automatically adds all missing typeclass arguments. For example,...
Tactic\WLOG.lean
/- Copyright (c) 2018 Johannes HΓΆlzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes HΓΆlzl, Mario Carneiro, Johan Commelin, Reid Barton, Thomas Murrills -/ import Mathlib.Tactic.Core /-! # Without loss of generality tactic The tactic `wlog h : P` will add a...
Tactic\Zify.lean
/- Copyright (c) 2022 Moritz Doll. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Moritz Doll, Mario Carneiro, Robert Y. Lewis -/ import Mathlib.Tactic.Basic import Mathlib.Tactic.Attr.Register import Mathlib.Data.Int.Cast.Basic import Mathlib.Order.Basic /-! # `zify`...
Tactic\ArithMult\Init.lean
/- Copyright (c) 2023 Arend Mellendijk. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Arend Mellendijk -/ import Aesop /-! # arith_mult Rule Set This module defines the `IsMultiplicative` Aesop rule set which is used by the `arith_mult` tactic. Aesop rule sets only...
Tactic\Attr\Core.lean
/- Copyright (c) 2023 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Mathlib.Tactic.Attr.Register /-! # Simp tags for core lemmas In Lean 4, an attribute declared with `register_simp_attr` cannot be used in the same file. So...
Tactic\Attr\Register.lean
/- Copyright (c) 2023 Yury Kudryashov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yury Kudryashov -/ import Lean.Meta.Tactic.Simp.SimpTheorems import Lean.Meta.Tactic.Simp.RegisterCommand import Lean.LabelAttribute /-! # Attributes used in `Mathlib` In this file ...
Tactic\Bound\Attribute.lean
/- Copyright (c) 2024 Geoffrey Irving. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Geoffrey Irving -/ import Mathlib.Algebra.Group.ZeroOne import Mathlib.Tactic.Bound.Init import Qq /-! # The `bound` attribute Any lemma tagged with `@[bound]` is registered as an a...
Tactic\Bound\Init.lean
/- Copyright (c) 2024 Geoffrey Irving. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Geoffrey Irving -/ import Aesop.Frontend.Command /-! # Bound Rule Set This module defines the `Bound` Aesop rule set which is used by the `bound` tactic. Aesop rule sets only becom...
Tactic\CancelDenoms\Core.lean
/- Copyright (c) 2020 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis -/ import Mathlib.Algebra.Field.Basic import Mathlib.Algebra.Order.Field.Defs import Mathlib.Data.Tree.Basic import Mathlib.Logic.Basic import Mathlib.Tactic.NormNum.C...
Tactic\CategoryTheory\BicategoricalComp.lean
/- Copyright (c) 2022 Yuma Mizuno. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuma Mizuno -/ import Mathlib.CategoryTheory.Bicategory.Basic /-! # Bicategorical composition `βŠ—β‰«` (composition up to associators) We provide `f βŠ—β‰« g`, the `bicategoricalComp` operation...
Tactic\CategoryTheory\BicategoryCoherence.lean
/- Copyright (c) 2022 Yuma Mizuno. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuma Mizuno -/ import Mathlib.CategoryTheory.Bicategory.Coherence import Mathlib.Tactic.CategoryTheory.BicategoricalComp /-! # A `coherence` tactic for bicategories We provide a `bicate...
Tactic\CategoryTheory\Coherence.lean
/- Copyright (c) 2022. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison, Yuma Mizuno, Oleksandr Manzyuk -/ import Mathlib.CategoryTheory.Monoidal.Free.Coherence import Mathlib.Lean.Meta import Mathlib.Tactic.CategoryTheory.BicategoryCoherence import Mathli...
Tactic\CategoryTheory\Elementwise.lean
/- Copyright (c) 2021 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison, Kyle Miller -/ import Mathlib.CategoryTheory.ConcreteCategory.Basic import Mathlib.Util.AddRelatedDecl import Batteries.Tactic.Lint /-! # Tools to reformulate categor...
Tactic\CategoryTheory\Monoidal.lean
/- Copyright (c) 2024 Yuma Mizuno. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Yuma Mizuno -/ import Mathlib.Tactic.CategoryTheory.Coherence /-! # Normalization of morphisms in monoidal categories This file provides a tactic that normalizes morphisms in monoidal ca...
Tactic\CategoryTheory\MonoidalComp.lean
/- Copyright (c) 2022. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison, Yuma Mizuno, Oleksandr Manzyuk -/ import Mathlib.CategoryTheory.Monoidal.Category /-! # Monoidal composition `βŠ—β‰«` (composition up to associators) We provide `f βŠ—β‰« g`, the `monoidalC...
Tactic\CategoryTheory\Reassoc.lean
/- Copyright (c) 2022 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import Mathlib.CategoryTheory.Functor.Basic import Mathlib.Util.AddRelatedDecl /-! # The `reassoc` attribute Adding `@[reassoc]` to a lemma named `F` of shape `βˆ€ .....
Tactic\CategoryTheory\Slice.lean
/- Copyright (c) 2018 Scott Morrison. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Scott Morrison -/ import Mathlib.CategoryTheory.Category.Basic import Mathlib.Tactic.Conv /-! # The `slice` tactic Applies a tactic to an interval of terms from a term obtained by r...
Tactic\CC\Addition.lean
/- Copyright (c) 2016 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Miyahara Kō -/ import Mathlib.Logic.Basic import Mathlib.Data.Option.Defs import Mathlib.Lean.Expr.Basic import Mathlib.Tactic.Relation.Rfl import Mathlib.Tac...
Tactic\CC\Datatypes.lean
/- Copyright (c) 2016 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Miyahara Kō -/ import Lean.Meta.CongrTheorems import Lean.Meta.Tactic.Rfl import Batteries.Data.HashMap.Basic import Batteries.Data.RBMap.Basic import Mathlib...
Tactic\CC\Lemmas.lean
/- Copyright (c) 2017 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura -/ import Mathlib.Init.Logic /-! Lemmas use by the congruence closure module -/ namespace Mathlib.Tactic.CC theorem iff_eq_of_eq_true_left {a b : Prop} (h ...
Tactic\Continuity\Init.lean
/- Copyright (c) 2023 Jannis Limperg. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Jannis Limperg -/ import Aesop /-! # Continuity Rule Set This module defines the `Continuous` Aesop rule set which is used by the `continuity` tactic. Aesop rule sets only become vi...
Tactic\Explode\Datatypes.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Evgenia Karunus, Kyle Miller -/ import Lean.Util.Trace /-! # Explode command: datatypes This file contains datatypes used by the `#explode` command and their associat...
Tactic\Explode\Pretty.lean
/- Copyright (c) 2018 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Evgenia Karunus, Kyle Miller -/ import Lean.Meta.Basic import Mathlib.Tactic.Explode.Datatypes /-! # Explode command: pretty This file contains UI code to render the ...
Tactic\FunProp\AEMeasurable.lean
/- Copyright (c) 2024 TomΓ‘Ε‘ SkΕ™ivan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: TomΓ‘Ε‘ SkΕ™ivan -/ import Mathlib.MeasureTheory.Measure.AEMeasurable /-! ## `fun_prop` minimal setup for AEMeasurable -/ open Mathlib -- lambda rules: these two are currently missing -...
Tactic\FunProp\Attr.lean
/- Copyright (c) 2024 Tomas Skrivan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tomas Skrivan -/ import Lean import Mathlib.Tactic.FunProp.Decl import Mathlib.Tactic.FunProp.Theorems /-! ## `funProp` attribute -/ namespace Mathlib open Lean Meta namespace Meta...
Tactic\FunProp\ContDiff.lean
/- Copyright (c) 2024 TomΓ‘Ε‘ SkΕ™ivan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: TomΓ‘Ε‘ SkΕ™ivan -/ import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas import Mathlib.Analysis.SpecialFunctions.ExpDeriv import Mathlib.Analysis.SpecialFunctions.Log.Deriv import Math...
Tactic\FunProp\Core.lean
/- Copyright (c) 2024 Tomas Skrivan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tomas Skrivan -/ import Lean import Mathlib.Tactic.FunProp.Theorems import Mathlib.Tactic.FunProp.ToBatteries import Mathlib.Tactic.FunProp.Types import Mathlib.Lean.Expr.Basic import B...
Tactic\FunProp\Decl.lean
/- Copyright (c) 2024 Tomas Skrivan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tomas Skrivan -/ import Lean /-! ## `funProp` environment extension that stores all registered function properties -/ namespace Mathlib open Lean Meta namespace Meta.FunProp /-- B...
Tactic\FunProp\Differentiable.lean
/- Copyright (c) 2024 TomΓ‘Ε‘ SkΕ™ivan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: TomΓ‘Ε‘ SkΕ™ivan -/ import Mathlib.Analysis.Calculus.FDeriv.Basic import Mathlib.Analysis.Calculus.FDeriv.Comp import Mathlib.Analysis.Calculus.FDeriv.Prod import Mathlib.Analysis.Calculus...
Tactic\FunProp\Elab.lean
/- Copyright (c) 2024 Tomas Skrivan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tomas Skrivan -/ import Lean import Mathlib.Tactic.FunProp.Core /-! ## `funProp` tactic syntax -/ namespace Mathlib open Lean Meta Elab Tactic namespace Meta.FunProp open Lean.Parse...
Tactic\FunProp\FunctionData.lean
/- Copyright (c) 2024 Tomas Skrivan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tomas Skrivan -/ import Lean import Qq import Mathlib.Tactic.FunProp.Mor /-! ## `funProp` data structure holding information about a function `FunctionData` holds data about function...
Tactic\FunProp\Mor.lean
/- Copyright (c) 2024 Tomas Skrivan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tomas Skrivan -/ import Lean import Mathlib.Data.FunLike.Basic import Mathlib.Tactic.FunProp.ToBatteries /-! ## `funProp` Meta programming functions like in Lean.Expr.* but for working...
Tactic\FunProp\RefinedDiscrTree.lean
/- Copyright (c) 2023 J. W. Gerbscheid. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: J. W. Gerbscheid -/ import Mathlib.Tactic.FunProp.StateList import Mathlib.Algebra.Group.Pi.Basic /-! We define discrimination trees for the purpose of unifying local expressions wi...
Tactic\FunProp\StateList.lean
/- Copyright (c) 2023 J. W. Gerbscheid. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: J. W. Gerbscheid The combined state and list monad transformer. `StateListT Οƒ Ξ±` is equivalent to `StateT Οƒ (ListT Ξ±)` but more efficient. WARNING: `StateListT Οƒ Ξ± m` is only a mon...
Tactic\FunProp\Theorems.lean
/- Copyright (c) 2024 Tomas Skrivan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tomas Skrivan -/ import Mathlib.Tactic.FunProp.Decl import Mathlib.Tactic.FunProp.Types import Mathlib.Tactic.FunProp.FunctionData import Mathlib.Tactic.FunProp.RefinedDiscrTree import ...
Tactic\FunProp\ToBatteries.lean
/- Copyright (c) 2024 Tomas Skrivan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tomas Skrivan -/ import Lean /-! ## `funProp` missing function from standard library -/ namespace Mathlib open Lean Meta namespace Meta.FunProp /-- Check if `a` can be obtained by r...
Tactic\FunProp\Types.lean
/- Copyright (c) 2024 Tomas Skrivan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tomas Skrivan -/ import Mathlib.Tactic.FunProp.FunctionData import Batteries.Data.RBMap.Basic /-! ## `funProp` this file defines environment extension for `funProp` -/ namespace Mat...
Tactic\GCongr\Core.lean
/- Copyright (c) 2023 Mario Carneiro, Heather Macbeth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Heather Macbeth -/ import Mathlib.Order.Defs import Mathlib.Tactic.Core import Mathlib.Tactic.GCongr.ForwardAttr import Batteries.Lean.Except import Ba...
Tactic\GCongr\ForwardAttr.lean
/- Copyright (c) 2023 Mario Carneiro, Heather Macbeth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Heather Macbeth -/ import Batteries.Tactic.Basic /-! # Environment extension for the forward-reasoning part of the `gcongr` tactic -/ open Lean Meta ...
Tactic\Linarith\Datatypes.lean
/- Copyright (c) 2020 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis -/ import Mathlib.Tactic.Linarith.Lemmas import Mathlib.Tactic.Ring.Basic import Mathlib.Util.SynthesizeUsing /-! # Datatypes for `linarith` Some of the data structu...
Tactic\Linarith\Frontend.lean
/- Copyright (c) 2018 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis -/ import Mathlib.Control.Basic import Mathlib.Tactic.Linarith.Verification import Mathlib.Tactic.Linarith.Preprocessing import Mathlib.Tactic.Linarith.Oracle.SimplexA...
Tactic\Linarith\Lemmas.lean
/- Copyright (c) 2020 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis -/ import Batteries.Tactic.Lint.Basic import Mathlib.Algebra.Order.Monoid.Unbundled.Basic import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Algebra.Order.ZeroLEOne...
Tactic\Linarith\Parsing.lean
/- Copyright (c) 2020 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis -/ import Mathlib.Tactic.Linarith.Datatypes /-! # Parsing input expressions into linear form `linarith` computes the linear form of its input expressions, assuming (...
Tactic\Linarith\Preprocessing.lean
/- Copyright (c) 2020 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis -/ import Mathlib.Tactic.Linarith.Datatypes import Mathlib.Tactic.Zify import Mathlib.Tactic.CancelDenoms.Core import Batteries.Data.RBMap.Basic import Mathlib.Control...
Tactic\Linarith\Verification.lean
/- Copyright (c) 2020 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis -/ import Mathlib.Tactic.Linarith.Parsing import Mathlib.Util.Qq /-! # Deriving a proof of false `linarith` uses an untrusted oracle to produce a certificate of uns...
Tactic\Linarith\Oracle\FourierMotzkin.lean
/- Copyright (c) 2020 Robert Y. Lewis. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robert Y. Lewis -/ import Mathlib.Tactic.Linarith.Datatypes import Batteries.Data.HashMap.WF /-! # The Fourier-Motzkin elimination procedure The Fourier-Motzkin procedure is a varia...
Tactic\Linarith\Oracle\SimplexAlgorithm.lean
/- Copyright (c) 2024 Vasily Nesterov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Nesterov -/ import Mathlib.Tactic.Linarith.Datatypes import Mathlib.Tactic.Linarith.Oracle.SimplexAlgorithm.PositiveVector /-! # The oracle based on Simplex Algorithm This fi...
Tactic\Linarith\Oracle\SimplexAlgorithm\Datatypes.lean
/- Copyright (c) 2024 Vasily Nesterov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Nesterov -/ import Batteries.Data.Rat.Basic /-! # Datatypes for the Simplex Algorithm implementation -/ namespace Linarith.SimplexAlgorithm /-- Specification for matrix type...
Tactic\Linarith\Oracle\SimplexAlgorithm\Gauss.lean
/- Copyright (c) 2024 Vasily Nesterov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Nesterov -/ import Mathlib.Tactic.Linarith.Oracle.SimplexAlgorithm.Datatypes /-! # Gaussian Elimination algorithm The first step of `Linarith.SimplexAlgorithm.findPositiveVec...
Tactic\Linarith\Oracle\SimplexAlgorithm\PositiveVector.lean
/- Copyright (c) 2024 Vasily Nesterov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Nesterov -/ import Mathlib.Tactic.Linarith.Oracle.SimplexAlgorithm.SimplexAlgorithm import Mathlib.Tactic.Linarith.Oracle.SimplexAlgorithm.Gauss /-! # `linarith` certificate s...
Tactic\Linarith\Oracle\SimplexAlgorithm\SimplexAlgorithm.lean
/- Copyright (c) 2024 Vasily Nesterov. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Vasily Nesterov -/ import Mathlib.Tactic.Linarith.Oracle.SimplexAlgorithm.Datatypes /-! # Simplex Algorithm To obtain required vector in `Linarith.SimplexAlgorithm.findPositiveVecto...
Tactic\Linter\GlobalAttributeIn.lean
/- Copyright (c) 2024 Michael Rothgang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Rothgang, Damiano Testa -/ import Lean.Elab.Command import Lean.Linter.Util /-! # Linter for `attribute [...] in` declarations Linter for global attributes created via `at...
Tactic\Linter\HashCommandLinter.lean
/- Copyright (c) 2024 Damiano Testa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Damiano Testa -/ import Lean.Elab.Command import Lean.Linter.Util import Batteries.Lean.HashSet /-! # `#`-command linter The `#`-command linter produces a warning when a command star...
Tactic\Linter\HaveLetLinter.lean
/- Copyright (c) 2024 Damiano Testa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Damiano Testa -/ import Lean.Elab.Command import Lean.Server.InfoUtils /-! # The `have` vs `let` linter The `have` vs `let` linter flags uses of `have` to introduce a hypothesis who...
Tactic\Linter\Lint.lean
/- Copyright (c) 2023 Floris van Doorn. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Floris van Doorn -/ import Lean.Linter.Util import Batteries.Data.String.Matcher import Batteries.Tactic.Lint /-! # Linters for Mathlib In this file we define additional linters fo...
Tactic\Linter\MinImports.lean
/- Copyright (c) 2024 Damiano Testa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Damiano Testa -/ import ImportGraph.Imports import Mathlib.Tactic.MinImports /-! # The `minImports` linter The `minImports` linter incrementally computes the minimal imports needed fo...
Tactic\Linter\OldObtain.lean
/- Copyright (c) 2024 Michael Rothgang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Rothgang -/ import Lean.Elab.Command import Lean.Linter.Util /-! # The `oldObtain` linter, against stream-of-conciousness `obtain` The `oldObtain` linter flags any occurre...
Tactic\Linter\RefineLinter.lean
/- Copyright (c) 2024 Damiano Testa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Damiano Testa -/ import Lean.Elab.Command import Lean.Linter.Util /-! # The "refine" linter The "refine" linter flags usages of the `refine'` tactic. The tactics `refine` and `refine...
Tactic\Linter\Style.lean
/- Copyright (c) 2024 Michael Rothgang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Rothgang -/ import Lean.Elab.Command import Lean.Linter.Util /-! ## Style linters This file contains (currently one, eventually more) linters about stylistic aspects: thes...
Tactic\Linter\TextBased.lean
/- Copyright (c) 2024 Michael Rothgang. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Rothgang -/ import Batteries.Data.String.Matcher import Mathlib.Data.Nat.Notation /-! ## Text-based linters This file defines various mathlib linters which are based on re...
Tactic\Linter\UnusedTactic.lean
/- Copyright (c) 2024 Damiano Testa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Damiano Testa -/ import Lean.Elab.Command import Lean.Linter.Util import Batteries.Tactic.Unreachable /-! # The unused tactic linter The unused linter makes sure that every tactic cal...
Tactic\Measurability\Init.lean
/- Copyright (c) 2023 Miyahara Kō. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Miyahara Kō -/ import Aesop /-! # Measurability Rule Set This module defines the `Measurable` Aesop rule set which is used by the `measurability` tactic. Aesop rule sets only become vi...
Tactic\Monotonicity\Attr.lean
/- Copyright (c) 2023 Heather Macbeth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Heather Macbeth -/ import Lean.LabelAttribute /-! # The @[mono] attribute -/ namespace Mathlib.Tactic.Monotonicity syntax mono.side := &"left" <|> &"right" <|> &"both" namespace A...
Tactic\Monotonicity\Basic.lean
/- Copyright (c) 2019 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Simon Hudon -/ import Lean.Elab.Tactic.SolveByElim import Mathlib.Tactic.Monotonicity.Attr /-! # Monotonicity tactic The tactic `mono` applies monotonicity rules (collected through the ...
Tactic\Monotonicity\Lemmas.lean
/- Copyright (c) 2019 Simon Hudon. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Simon Hudon -/ import Mathlib.Algebra.Order.Group.Abs import Mathlib.Algebra.Order.Ring.Defs import Mathlib.Algebra.Order.Sub.Canonical import Mathlib.Data.Set.Lattice import Mathlib.Tact...
Tactic\Nontriviality\Core.lean
/- Copyright (c) 2020 SΓ©bastien GouΓ«zel. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: SΓ©bastien GouΓ«zel, Mario Carneiro -/ import Qq.MetaM import Mathlib.Logic.Nontrivial.Basic import Mathlib.Tactic.Attr.Core /-! # The `nontriviality` tactic. -/ universe u namespa...
Tactic\NormNum\Basic.lean
/- Copyright (c) 2021 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro, Thomas Murrills -/ import Mathlib.Tactic.NormNum.Core import Mathlib.Tactic.HaveI import Mathlib.Data.Nat.Cast.Commute import Mathlib.Algebra.Ring.Int import Mathlib.Al...
Tactic\NormNum\BigOperators.lean
/- Copyright (c) 2023 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Floris van Doorn -/ import Mathlib.Tactic.NormNum.Basic import Mathlib.Algebra.BigOperators.Group.Finset import Mathlib.Data.List.FinRange /-! # `norm_num` plugin for big op...
Tactic\NormNum\Core.lean
/- Copyright (c) 2022 Mario Carneiro. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Mario Carneiro -/ import Mathlib.Tactic.NormNum.Result import Mathlib.Util.Qq import Lean.Elab.Tactic.Location /-! ## `norm_num` core functionality This file sets up the `norm_num` t...
Tactic\NormNum\DivMod.lean
/- Copyright (c) 2023 Anne Baanen. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Anne Baanen, Mario Carneiro -/ import Mathlib.Tactic.NormNum.Basic import Mathlib.Tactic.NormNum.Ineq /-! # `norm_num` extension for integer div/mod and divides This file adds support f...