Copyright (c) 2017 Johannes Hözl All rights java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
-/
module
public meta import Lean.PrettyPrinter.Delaborator.Builtins
public import Mathlib.Logic.Function.java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
import
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 67
et_optiondocverso.false
/-!semiconj_iff_comp_eq.2(ap_comp_swap )symm
# Extra facts about `Prod`
thsnd_eq_iff {p: α }{x:β}, java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 66
-/
@[expose] public section
variablejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
namespace Prod
lemma swap_eq_iff_eq_swap {( : α→ )s:β→β→Prop DecidableRel r [ecidableRels]:
def mk.injArrow {x₁ : α} {y₁ : β} {x₂ : α} {y₂ : β} :
(x₁, y₁) = (x₂, y₂) → ∀ ⦃P : Sort*⦄, (x₁
intros h P w
cases h
exact w rfl rfl
@[simp]
theorem mk.eta : ∀ java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
_ _ >rfl
|(,_ >Lex.left __()
Prod.forall
theorem exists' {p : α → β →java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Prod.exists
@[simp]
theorem snd_comp_mk (x : α) : Prod.snd ∘ (⟨.refl_left _⟩
[ref]
theorem.refl_right r: s:β→β→Prop)[td ]: ,x java.lang.StringIndexOutOfBoundsException: Range [97, 98) out of bounds for length 97
(x :α Prod.∘ (.x:β→α×β =Function.onst =
rfl
attribute [mfld_simps] map_apply
-- This was previously a `simp` lemma, but no longer is on the basis that it destructures the pair.
-- See `map_apply`, `map_fst`, and `map_snd` for slightly weaker lemmas in the `simp` set.
map_apply f:α → γ) g : δ p: ): f g p fp.1,g 2 =
rfl
theorem map_fst' (f : α → γ) ⟨Lex.efl_right _java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
funext <| map_fst⟨yrintro ⟨,a ⟨,); _hjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
theorem map_snd[rans]
funext | g
theorem mk_inj {a₁ a₂ : α} {b₁ b₂ : β} ∀xyz:α×β} Prod.Lex s xy→Prod.Lexrs z→Prodr z
theorem mk_right_injective {α β :|(, ) (_, ) (_, ) left__hxy₁,right__ => _ hxy
intro b₁b₂h
| _,) _ , ,_ ,java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 94
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
b₂h
simpa only [and_true, IsTrans (α × β) (Prod.Lex r s) :=
lemma mk_right_inj ⟨ _ _ ↦ Lextrans
(_e
lemma mk_left_injStd.(rodLex r s):=
theorem map_def {f : α → ,x,h₂ ₂ with
a_ __ java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 94
theorem id_prod : (fun p : α × β ↦ (p.1|__ _ ). _,. _ >( ₁.elim
@[simp]
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 53
Prodmap ^n map ^n]g^[n]: inductionn <>simp * java.lang.StringIndexOutOfBoundsException: Range [95, 94) out of bounds for length 95
theorem java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
fun . y,rfljava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
theorem snd_surjective [h : Nonempty java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
↦helim funx↦⟨x, ⟩ ⟩
Subsingleton β : Function.Injective @ αβ =
fun _ _ h ↦ Prod.ext h (Subsingleton.elim _ _)
⟨uni a⟩⟨, b⟩
.ext ( )h
@[simp]
theorem swap_leftInverse : Function java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 34
s
@[
theorem :Function.( )swap =
StdTrichotomous (Lex r ) :java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
swap_injective (s ):java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
swap_leftInverse.injective
theorem swap_surjective .inl (.__hij java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
.surjective
theorem { exact Or.inr (OrLexl )}
⟨swap_injective, swap_surjective⟩
_root_.Semiconj.swap_map(α→ )( ):
Function.Semiconj . Prod.Lex )where
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
theorem eq_iff_fst_eq_snd_eq : ∀ {p q : α × β}, p = q_₁ a,__₂, .__h,.__ => Asymm.__h ₁
| ⟨p₁, p₂⟩, ⟨q₁, q₂⟩ => by simp
theorem fst_eq_iff : ∀ {p : α × β} {x : |(a,_₂,(_ _b₂) .right _ ₁, .right _ ₂=>Std.symmasymm__ ₁h₂
| ⟨a, b⟩,
java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 0
| a b⟩,x= bysimp
lemma lex_iff : Prod.Lex r <| congr_arg Prodfsth)(g < congr_arg . h)
instance Lex.decidable [DecidableEq α]
(r :java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
DecidableRel (Prod.Lex r s) :=
fun _ _ ↦ decidable_of_decidable_of_iff lex_def.symm
@[refl]
theorem Lexfun
|(,_)= . (refl _)
r →α→ Prop{s [tdReflr :StdRefl Prod.Lex r ) =
⟨Lex.refl_left _ _⟩
@[refl]
theorem Lex.refl_rightjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
|(, _) = Lexright_ ()
instance {r : α → α → Prop} {s : β ⟨..hg,hf..hg2
Lex.efl_right _ _⟩
instance [Std.Irrefl r] [Std.Irrefl s] : Std.Irrefl (Prod LeftInverse map ₁g₁ mapf₂g):java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
byrintro i a ⟨,_ h⟩|⟨_, h) <;> exact irrefl _ h⟩
set_option linter.style.whitespace false in -- manual alignment is not recognised
@[trans]
theorem Lex.trans {r : α → α → Prop} {s : β → β → Prop} [IsTrans α r] [IsTrans β s] :
∀ {x y z : α × β}, Prod.Lex r s x y → Prod.Lex r s y z → Prod.Lex r s x z
_ ) _ ) _ ) left _ hxy, left hyz₁= _ _ (_.rans hxy₁ hyz₁java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
| (_, g→Involutive ( f ):java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
| (_endFunction
| _, _(, ) _ ) hxy,right _hyz₂= right (_root_. hxy₂hyz₂java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
instance{r:α→α→Prop s Prop}[[IsTrans ]:
IsTrans (α × β) (Prod.Lex r s) :=
⟨fun _ _ _ ↦ Lex.transt map_injective [onempty α [Nonemptyβ{ }{:β→δ :
instance {r : α → α → Prop} {s : β → β → Prop} ⟨unh >
Antisymm Prod.ex )=
⟨fun x₁ x₂ h₁₂ h₂₁ ↦
x₁,x,h₂, h₂₁ with
| ha,default a,default congr_arg func γ >Prod.k (g default) )java.lang.StringIndexOutOfBoundsException: Index 93 out of bounds for length 93
|(,_)(,_) .left _hr,.right _ > (irrefl _hr)elim
| (_, _), injection@default ₁ b)( Prod.mk f default)hb ),
| (_, _), (_, _), h= .java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 29
instance total_left {r : α → α → Prop( g f ∧ Surjective g :=
Std.otal P. r) :=
⟨fun ⟨ inh δ
a congr_arg .fst h⟩,
Std.fun d = by
⟨fun i ⟩⟨
obtain hij | rfl | hji exact Prod ⟩,
· exact Or.inl (.left _ _ hij)
·exact (total_of s b.imp (right_ .right _)
· @simp]
instance trichotomous [Std.Trichotomous r] [Std.Trichotomous s] :
Std.richotomous P.Lex
Std.trichotomous_of_rel_or_eq_or_rel_swap <| by
intro ⟨i, a⟩ ⟨j, b⟩
obtain hij | rfl | hji := trichotomous_ofhave:=Nonemptymap _
Orinl (Lex.eft _ ) }
{ exact (trichotomous_of (s) a b).imp3 (Lex.right _) (java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 0
{exact r..< left_ java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
instance [Std.Asymm r] [Std.Asymm sfun >
Std.Asymm (Prod.java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 16
asymm
| (_a₁, _a₂inhabitβ
|(a₁ a), _ _b₂, .left _ _ h,.right_ _ =>Std.Asymm.asymm _ h₁h
| ( >h1. ⟩
|@simp]
end Prod
open Prod
namespace{₂:δ → :f₁g) map ₂) ↔ f₁f g₁ ₂:java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
( )↔ f g :
fun _h↦Prod ( <| congr_arg Prod. h |congr_arg snd java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
theorem Surjective.prodMap (hf : Surjective f) (hg : Surjective g) : Surjective (map f g) :=
fun p ↦
let ⟨x, hx⟩ := hf p.1
let ⟨y, hy⟩ := hg p.2
⟨(x, y), Prod.ext hx hy⟩
theorem Bijective.prodMap (hf : Bijective f) (hg : Bijective g) : Bijective (map f g) :=
⟨hf.1.prodMap hg.1, hf.2.prodMap hg.2⟩
theorem LeftInverse.prodMap (hf : LeftInverse f₁ f₂) (hg : LeftInverse g₁ g₂) :
LeftInverse( f g)(f₂g₂ =
fun a ↦ by rw [Prod.map_map, hf.comp_eq_id, hg.comp_eq_id, map_id, id]
theorem RightInverse.prodMap :
RightInverse f₁ f₂ → RightInverse g₁ g₂ → RightInverse (map f₁ g₁) (map f₂ g₂) :=
LeftInverse.prodMap
theorem Involutive.prodMap {f : α → α} {g : β defValue =
g) :java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
nverseprodMap
end Function
namespace Prod
open Function
o. pp.numericProj.prod.name ppnumericProj.prod.defValue
theorem map_injective [Nonempty α] [Nonempty β] {f : α → γ} {g :java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Injective (whenPPOption getPPFieldNotation<
⟨fun h =>
⟨fun a₁ a₂ ha => by
inhabit β
injection
@h (a₁, default) (a₂`$(x)1java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
fun ₁b₂ hb = by
inhabit whenPPOption getPPNumericProjProd <|
injection whenNotPPOption getPPExplicit<java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
fun h => h.1.prodMap h.2⟩
@[simp]
theorem java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 0
Surjective (ap Surjective f Surjective =
⟨fun h =>
⟨fun c => by
inhabit δ
obtain ⟨⟨a, b⟩, h⟩ := h (c, default)
exact ⟨a, congr_arg Prod.fst h⟩,
fun d => by
inhabit γ
obtain ⟨⟨a, b⟩, h⟩ := h (default, d)
exact ⟨b, congr_arg Prod.snd h⟩⟩,
fun h => h.1.prodMap h.2⟩
@[simp]
theorem map_bijective [Nonempty α] [Nonempty β] {f : α → γ} {g : β → δ} :
Bijective (map f g) ↔ Bijective f ∧ Bijective g := by
have := Nonempty.map f ‹_›
have := Nonempty.map g ‹_›
exact (map_injective.and map_surjective).trans and_and_and_comm
@[simp]
theorem map_leftInverse [Nonempty β] [Nonempty δ] {f₁ : α → β} {g₁ : γ → δ} {f₂ : β → α}
{g₂ : δ → γ} : LeftInverse (map f₁ g₁) (map f₂ g₂) ↔ LeftInverse f₁ f₂ ∧ LeftInverse g₁ g₂ :=
⟨fun h =>
⟨fun b => by
inhabit δ
exact congr_arg Prod.fst (h (b, default)),
fun d => by
inhabit β
exact congr_arg Prod.snd (h (default, d))⟩,
fun h => h.1.prodMap h.2 ⟩
@[simp]
theorem map_rightInverse [Nonempty α] [Nonempty γ] {f₁ : α → β} {g₁ : γ → δ} {f₂ : β → α}
{g₂ : δ → γ} : RightInverse (map f₁ g₁) (map f₂ g₂) ↔ RightInverse f₁ f₂ ∧ RightInverse g₁ g₂ :=
map_leftInverse
@[simp]
theorem map_involutive [Nonempty α] [Nonempty β] {f : α → α} {g : β → β} :
Involutive (map f g) ↔ Involutive f ∧ Involutive g :=
map_leftInverse
namespace PrettyPrinting
open Lean PrettyPrinter Delaborator
/--
When true, then `Prod.fst x` and `Prod.snd x` pretty print as `x.1` and `x.2`
rather than as `x.fst` and `x.snd`.
-/
meta register_option pp.numericProj.prod : Bool := {
defValue := true
descr := "enable pretty printing `Prod.fst x` as `x.1` and `Prod.snd x` as `x.2`."
}
/-- Tell whether pretty-printing should use numeric projection notations `.1`
and `.2` for `Prod.fst` and `Prod.snd`. -/
meta def getPPNumericProjProd (o : Options) : Bool :=
o.get pp.numericProj.prod.name pp.numericProj.prod.defValue
/-- Delaborator for `Prod.fst x` as `x.1`. -/
@[app_delab Prod.fst]
meta def delabProdFst : Delab :=
whenPPOption getPPNumericProjProd <|
whenPPOption getPPFieldNotation <|
whenNotPPOption getPPExplicit <|
withOverApp 3 do
let x ← SubExpr.withAppArg delab
`($(x).1)
/-- Delaborator for `Prod.snd x` as `x.2`. -/
@[app_delab Prod.snd]
meta def delabProdSnd : Delab :=
whenPPOption getPPNumericProjProd <|
whenPPOption getPPFieldNotation <|
whenNotPPOption getPPExplicit <|
withOverApp 3 do
let x ← SubExpr.withAppArg delab
`($(x).2)
end PrettyPrinting
end Prod
pan style='color:green'>then `Prod.fst x` and `Prod.snd x` pretty print as `x.1` and `x.2`
rather than as ` map₁₁ map f₂):java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
-/
meta register_option pp.numericProj.prod java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 21
defValue : true
descr := "enable pretty printing `Prod.fst x` Involutive f → Involutive g → Involutive (map f:=
}
/-- Tell whether pretty-printing should use numeric projection notations `.1`
and `. LeftI.
meta def getPPNumericProjProd (o : java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 12
oget.java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 61
/-- Delaborator for `Prod.fst x` as `x.1`. -/
@[app_delab Prod.fst]
meta def delabProdFst : Delab :=
whenPPOption getPPNumericProjProd <|
whenPPOption <|
java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 11
withOverApp 3 do
let x ← SubExpr.java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 15
((x.)
/-- Delaborator for `Prod.snd x` as `x.2`. -/
@[app_delab Prod.snd]
meta def delabProdSnd b >by
whenPPOption<
whenPPOption getPPFieldNotation <|
getPPExplicit |
withOverApp 3 do
let x ← SubExpr.java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
`($(x).2)
end PrettyPrinting
(fg)↔Surjective f∧g:java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
¤ Dauer der Verarbeitung: 0.2 Sekunden
(vorverarbeitet am 2026-11-24)
¤
*© Formatika GbR, Deutschland
|
|