def
definition
neg
show as:
view math explainer →
open explainer
Generate a durable explainer page for this declaration.
open lean source
IndisputableMonolith.Numerics.Interval.Basic on GitHub at line 66.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
used by
-
sub_eq_add -
J_at_phi -
PhiInt -
PhiInt -
canonicalPhiRingObj -
PhiRingHom -
PhiRingObj -
duhamelRemainderOfGalerkin_integratingFactor -
tendsto_duhamelKernelIntegral_of_dominated_convergence -
encodeClause -
clauseUnit -
clauseUnit_correct -
known_lit_false'' -
valueOfLit -
evalLit -
Lit -
mentionsVarLit -
deriv_alphaInv_of_gap -
logarithmic_derivative_constant -
dAlembert_to_ODE_general -
ode_cos_uniqueness -
dAlembert_to_ODE_general -
ode_cos_uniqueness -
dAlembert_to_ODE_general_theorem -
dAlembert_to_ODE_theorem -
dAlembert_to_ODE_theorem -
Jcost_log_second_deriv_normalized -
neg -
ode_cos_unit_uniqueness -
toComplex_neg -
even_function_deriv_zero -
separable_forces_flat_ode -
Gspher_satisfies_spherical -
dalembert_deriv_ode -
neg -
neg -
C_RS_minus_C_classical_tendsto_zero -
ode_cos_uniqueness_contdiff -
bet1_boundaryTerm_integrable_of_L2_mul_r -
operatorPairing_of_decayFull
formal source
63 exact add_le_add hx.2 hy.2
64
65/-- Negation of intervals: -[a,b] = [-b, -a] -/
66def neg (I : Interval) : Interval where
67 lo := -I.hi
68 hi := -I.lo
69 valid := neg_le_neg I.valid
70
71instance : Neg Interval where
72 neg := neg
73
74@[simp] theorem neg_lo (I : Interval) : (-I).lo = -I.hi := rfl
75@[simp] theorem neg_hi (I : Interval) : (-I).hi = -I.lo := rfl
76
77theorem neg_contains_neg {x : ℝ} {I : Interval} (hx : I.contains x) : (-I).contains (-x) := by
78 constructor
79 · simp only [neg_lo, Rat.cast_neg]
80 exact neg_le_neg hx.2
81 · simp only [neg_hi, Rat.cast_neg]
82 exact neg_le_neg hx.1
83
84/-- Subtraction of intervals: [a,b] - [c,d] = [a-d, b-c] -/
85def sub (I J : Interval) : Interval where
86 lo := I.lo - J.hi
87 hi := I.hi - J.lo
88 valid := by linarith [I.valid, J.valid]
89
90instance : Sub Interval where
91 sub := sub
92
93@[simp] theorem sub_lo (I J : Interval) : (I - J).lo = I.lo - J.hi := rfl
94@[simp] theorem sub_hi (I J : Interval) : (I - J).hi = I.hi - J.lo := rfl
95
96theorem sub_contains_sub {x y : ℝ} {I J : Interval}