/- Copyright 2026 The Formal Conjectures Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -/ module public import Mathlib.SetTheory.Cardinal.Arithmetic@[expose] public sectionnamespace Cardinalvariable {α : Type*} {s t : Set α}All goals completed! 🐙@[simp] lemma mk_sdiff_eq_left' (hs : s.Infinite) (hst : #(s t) < #s) : #(s \ t) = #s := α:Type u_1s:Set αt:Set αhs:s.Infinitehst:#(s t) < #s#(s \ t) = #s refine (mk_le_mk_of_subset Set.sdiff_subset).eq_of_not_lt fun h (add_lt_of_lt (α:Type u_1s:Set αt:Set αhs:s.Infinitehst:#(s t) < #sh:#(s \ t) < #sℵ₀ #s All goals completed! 🐙) hst h).not_ge ?_ grw [α:Type u_1s:Set αt:Set αhs:s.Infinitehst:#(s t) < #sh:#(s \ t) < #s#s #(s t s \ t) α:Type u_1s:Set αt:Set αhs:s.Infinitehst:#(s t) < #sh:#(s \ t) < #s#s #sAll goals completed! 🐙@[simp] lemma mk_sdiff_eq_left (hs : s.Infinite) (hts : #t < #s) : #(s \ t) = #s := mk_sdiff_eq_left' hs <| hts.trans_le' <| mk_subtype_mono Set.inter_subset_right@[simp] lemma mk_sdiff_eq_left_of_finite' (hs : s.Infinite) (hst : (s t).Finite) : #(s \ t) = #s := mk_sdiff_eq_left' hs <| (aleph0_le_mk_set.2 hs).trans_lt' <| α:Type u_1s:Set αt:Set αhs:s.Infinitehst:(s t).Finite#(s t) < ℵ₀ All goals completed! 🐙@[simp] lemma mk_sdiff_eq_left_of_finite (hs : s.Infinite) (ht : t.Finite) : #(s \ t) = #s := mk_sdiff_eq_left hs <| (aleph0_le_mk_set.2 hs).trans_lt' <| α:Type u_1s:Set αt:Set αhs:s.Infiniteht:t.Finite#t < ℵ₀ All goals completed! 🐙end Cardinal