def show_natural_loggedness(self, expression): base, constant = expression[1], expression[-3] log_constant, exp_constant = constant.copy(), constant.copy() log_base, exp_base = base.copy(), base.copy() log_equals, exp_equals = map(TexMobject, "==") ln = TexMobject("\\ln(2)") log_base.move_to(ln[-2]) ln.remove(ln[-2]) log_equals.next_to(ln, LEFT) log_constant.next_to(log_equals, LEFT) log_expression = VGroup( ln, log_constant, log_equals, log_base ) e = TexMobject("e") exp_constant.scale(0.7) exp_constant.next_to(e, UP+RIGHT, buff = 0) exp_base.next_to(exp_equals, RIGHT) VGroup(exp_base, exp_equals).next_to( VGroup(e, exp_constant), RIGHT, aligned_edge = DOWN ) exp_expression = VGroup( e, exp_constant, exp_equals, exp_base ) for group, vect in (log_expression, UP), (exp_expression, DOWN): group.to_edge(RIGHT) group.shift(vect) self.play( ReplacementTransform(base.copy(), log_base), ReplacementTransform(constant.copy(), log_constant), run_time = 2 ) self.play(Write(ln), Write(log_equals)) self.dither() self.play( ReplacementTransform( log_expression.copy(), exp_expression, run_time = 2, ) ) self.dither(2) ln_a = expression[-1] self.play( FadeOut(expression[-2]), FadeOut(constant), ln_a.move_to, constant, LEFT, ln_a.highlight, BLUE ) self.dither() self.play(*map(FadeOut, [log_expression, exp_expression])) self.dither()
def show_natural_loggedness(self, expression): base, constant = expression[1], expression[-3] log_constant, exp_constant = constant.copy(), constant.copy() log_base, exp_base = base.copy(), base.copy() log_equals, exp_equals = map(TexMobject, "==") ln = TexMobject("\\ln(2)") log_base.move_to(ln[-2]) ln.remove(ln[-2]) log_equals.next_to(ln, LEFT) log_constant.next_to(log_equals, LEFT) log_expression = VGroup(ln, log_constant, log_equals, log_base) e = TexMobject("e") exp_constant.scale(0.7) exp_constant.next_to(e, UP + RIGHT, buff=0) exp_base.next_to(exp_equals, RIGHT) VGroup(exp_base, exp_equals).next_to(VGroup(e, exp_constant), RIGHT, aligned_edge=DOWN) exp_expression = VGroup(e, exp_constant, exp_equals, exp_base) for group, vect in (log_expression, UP), (exp_expression, DOWN): group.to_edge(RIGHT) group.shift(vect) self.play(ReplacementTransform(base.copy(), log_base), ReplacementTransform(constant.copy(), log_constant), run_time=2) self.play(Write(ln), Write(log_equals)) self.dither() self.play( ReplacementTransform( log_expression.copy(), exp_expression, run_time=2, )) self.dither(2) ln_a = expression[-1] self.play(FadeOut(expression[-2]), FadeOut(constant), ln_a.move_to, constant, LEFT, ln_a.highlight, BLUE) self.dither() self.play(*map(FadeOut, [log_expression, exp_expression])) self.dither()
def construct(self): #self.force_skipping() shift = self.shift # countable subset self.play(Transform(self.count_subset, self.shifted_count_subset)) self.wait_to(5.1) self.play(Transform(self.count_subset, self.al_count_subset)) self.wait_to(12) self.play(self.count_brace.creation_anim()) self.wait_to(17) self.play(FadeOut(VGroup(self.count_brace, self.count_subset))) # uncountable subset unc_initial = LimitSubOrdinal([subord[0] for subord in self.omega1[1]]) unc_initial = unc_initial.copy() unc_line = DashedLine(self.omega1[0].get_edge_center(LEFT), self.omega1[0].get_edge_center(RIGHT)) unc_line.gradient_highlight(BLACK, WHITE) start_x = unc_initial.get_edge_center(RIGHT)[0] unc_line.submobjects = filter( lambda l: l.get_edge_center(LEFT)[0] > start_x, unc_line.submobjects) unc_subset = VGroup(unc_initial, unc_line) self.play(VGroup(unc_initial, unc_line).shift, 2 * shift * DOWN) self.revert_to_original_skipping_status() self.dither() al_unc_subset = Omega1().shift(shift * DOWN) al_unc_line, al_unc_initial = al_unc_subset ini_index = 9 al_unc_line_parts = [] # split gradient line to larger parts line_len = (unc_line[2].get_center() - unc_line[1].get_center())[0] remaining = len(unc_line) - (ini_index + 1) - 1 next_split = al_unc_line.get_edge_center(LEFT)[0] for grad_part in al_unc_line: if remaining > 0 and grad_part.get_center()[0] >= next_split: next_split += line_len al_unc_line_parts.append([]) al_unc_line_parts[-1].append(grad_part) al_unc_line_parts = VGroup(al_unc_line_parts) self.play( Transform( VGroup(unc_line[ini_index + 1:]), al_unc_line_parts, ), Transform(unc_initial, al_unc_initial[0]), Transform( VGroup(unc_line[:ini_index]), VGroup(al_unc_initial[1:ini_index + 1]), ), Transform( unc_line[ini_index], VGroup(unc_initial[ini_index + 1:]), )) self.remove(*self.mobjects_from_last_animation) unc_subset = al_unc_subset self.add(unc_subset) unc_brace = BraceText(unc_subset, "stejná") self.play(unc_brace.creation_anim()) cardinality = TexMobject("|", "\\omega_1", "|=\\aleph_1") cardinality.shift(self.omega1_brace.desc.get_center() - cardinality[1].get_center()) cardinality.remove(cardinality[1]) self.wait_to(36) self.play(Write(cardinality)) self.wait_to(46)
def construct(self): #self.force_skipping() bubble = SVGMobject(file_name = "thought_bubble", initial_scale_factor = 0.31) bubble.set_color(WHITE) bubble.stretch(1.25, 0) bubble.to_corner(DOWN+RIGHT) self.play(ShowCreation(VGroup(*bubble[:2]))) self.play(ShowCreation(bubble[2])) self.dither() subbubbles = self.make_fractal(bubble[-1], [0.8*LEFT, 0.8*RIGHT]) self.play(ShowCreation(subbubbles, submobject_mode = "all_at_once", run_time = 2)) self.dither() main_rect = Rectangle(width = 2*SPACE_WIDTH-1, height = 2*SPACE_HEIGHT-1) rect_template = main_rect.copy() rect_template.stretch_about_point(0.5, 1, rect_template.get_edge_center(UP)) subrects = self.make_fractal(rect_template, [0.9*LEFT, 0.9*RIGHT], ratio = (0.45, 0.8, 0.6)) self.play(ReplacementTransform(bubble[-1], main_rect), ReplacementTransform(subbubbles, subrects), bubble[0].behind_edge, DOWN, bubble[1].behind_edge, DOWN, run_time = 2) #self.dither() implications = TexMobject("\Rightarrow\Leftarrow") implications.arrange_submobjects(DOWN, buff = 0.5) implications.rotate(-np.pi/2) contradiction = VGroup( TexMobject("X\\in X"), implications, TexMobject("X\\not\\in X"), ) contradiction.arrange_submobjects(DOWN) contradiction.to_corner(LEFT+DOWN, buff = 1) contradiction.shift(RIGHT) contradiction.add(implications[1]) implications.remove(implications[1]) self.revert_to_original_skipping_status() #self.dither() self.play(FadeIn(contradiction, submobject_mode = "lagged_start")) #self.dither() questionmarks = TextMobject("???") questionmarks.next_to(contradiction, buff = 0.5) #self.play(Write(questionmarks)) #self.dither() #contradiction.add(questionmarks) cross = Cross().set_color(RED) cross.scale(( contradiction.get_width() / cross.get_width(), contradiction.get_height() / cross.get_height(), 1, )) cross.move_to(contradiction) title = TextMobject("Set Theory").scale(1.3).to_edge(UP) division = DashedLine(title.get_edge_center(DOWN) + 0.2*DOWN, SPACE_HEIGHT*DOWN) self.play( contradiction.highlight, DARK_GREY, ShowCreation(cross), ) axioms = TextMobject("Axioms") axioms.next_to(division) self.play(Write(axioms)) self.dither() left_rect, right_rect = [], [] for rect in subrects: if rect.get_center()[0] < 0: left_rect.append(rect) else: right_rect.append(rect) left_rect = VGroup(*left_rect) right_rect = VGroup(*right_rect) self.play(FadeOut(VGroup(right_rect, main_rect, contradiction, cross))) self.play( ShowCreation(division), UnapplyMethod(title.behind_edge, UP), left_rect.to_edge, DOWN, 0.8, ) self.dither() theory_of_infinity = TextMobject("Theory of Infinity").highlight(BLUE) foundations_of_mathematics = TextMobject("Foundations of\\\\ Mathematics", alignment = "\\raggedright") theory_of_infinity.next_to(division, LEFT, aligned_edge = UP) foundations_of_mathematics.next_to(division, RIGHT, aligned_edge = UP) VGroup(theory_of_infinity, foundations_of_mathematics).shift(0.2*DOWN) self.play(FadeIn(theory_of_infinity), run_time = 2, submobject_mode = "lagged_start") self.dither() self.play(FadeIn(foundations_of_mathematics), run_time = 2, submobject_mode = "lagged_start") self.dither()
def construct(self): num = 5 ordinals_cnt_base = OrdinalFiniteProd(OrdinalOmega, num, x1=-4 + num * 2.5) ordinals_cnt = VGroup( [VGroup(ordinals_cnt_base[:i]).copy() for i in range(1, num + 1)]) ordinals_cnt.save_state() ordinals_cnt.arrange_submobjects(DOWN, center=False, coor_mask=Y_MASK) ordinals_cnt.to_edge(UP) self.play(ShowCreation(ordinals_cnt)) #self.wait_to(7) self.dither() self.play(ordinals_cnt.restore) self.remove(ordinals_cnt) self.add(ordinals_cnt_base) omega1 = Omega1() brace = BraceDesc(omega1, "\\omega_1", DOWN) omega1.line.save_state() omega1.line.behind_edge(RIGHT) omega1_bars_src = make_ordinal_power(2) omega1_bars_src.next_to(ordinals_cnt_base) omega1_bars_src.add_to_back(*ordinals_cnt_base) brace.desc.highlight(BLUE) brace.save_state() brace.shift_brace(omega1_bars_src) brace.highlight(BLACK) self.play( brace.restore, omega1.line.restore, ReplacementTransform(omega1_bars_src, omega1.bars), ) #self.wait_to(11) self.dither() aleph1 = TexMobject("\\aleph_1", "=|", "\omega_1", "|") aleph1[2].highlight(BLUE) aleph1[0].highlight(RED) aleph1.shift(brace.desc.get_center() - aleph1[2].get_center()) aleph1.remove(aleph1[2]) self.play(Write(aleph1)) #self.wait_to(15) self.dither() ordinals_a1 = VGroup([omega1.copy() for _ in range(num)]) aleph1[0].save_state() aleph1[0].next_to(omega1, LEFT, coor_mask=X_MASK) self.play( omega1.to_edge, UP, FadeOut(VGroup(brace, aleph1[1:])), MoveFromSaved(aleph1[0]), ) #self.wait_to(18.5) self.dither() aleph1 = aleph1[0] scale_center = np.array(ordinals_a1[0].line.get_start()) for i, o in enumerate(ordinals_a1): o.line.scale(1 + i * 0.2, about_point=scale_center) ordinals_a1_lines_dest = VGroup([o.line for o in ordinals_a1]).copy() ordinals_a1_bars_dest = VGroup([o.bars for o in ordinals_a1]).copy() ordinals_a1.arrange_submobjects(DOWN, False, coor_mask=Y_MASK) ordinals_a1.to_edge(UP) ordinals_a1_lines = VGroup([o.line for o in ordinals_a1]) ordinals_a1_bars = VGroup([o.bars for o in ordinals_a1]) self.remove(omega1) self.add(ordinals_a1[0]) self.play(FadeIn(VGroup(ordinals_a1[1:]))) self.play( Transform(ordinals_a1_lines, ordinals_a1_lines_dest), Transform(ordinals_a1_bars, ordinals_a1_bars_dest), ) self.remove(*ordinals_a1[:-1]) omega2_src = ordinals_a1[-1] omega2 = LongOrdinal(ordinal_end=0.3, line_start=0.2) brace = BraceDesc(omega2, "\\omega_2", DOWN) brace.desc.highlight(BLUE) brace.save_state() brace.shift_brace(omega2_src) brace.highlight(BLACK) self.play( brace.restore, ReplacementTransform(omega2_src, omega2), ) #self.wait_to(24.5) self.dither() aleph2 = TexMobject("\\aleph_2", "=|", "\omega_2", "|") aleph2[2].highlight(BLUE) aleph2[0].highlight(RED) aleph2.shift(brace.desc.get_center() - aleph2[2].get_center()) aleph2.remove(aleph2[2]) self.play(Write(aleph2)) #self.wait_to(28) self.dither() ordinal_fin = OrdinalFinite(7, x1=SPACE_WIDTH + 1).highlight(BLUE) ord_labels = VGroup([ TexMobject("\\omega_{}".format(i + 1)).highlight(BLUE).next_to( bar, UP) for i, bar in enumerate(ordinal_fin[:4]) ]) card_labels = VGroup([ TexMobject("\\aleph_{}".format(i + 1)).highlight(RED).next_to( bar, DOWN) for i, bar in enumerate(ordinal_fin[:4]) ]) self.play( FadeOut(VGroup(aleph2[1:], brace, omega2)), ReplacementTransform(aleph1, card_labels[0]), ReplacementTransform(aleph2[0], card_labels[1]), ) for i, t in enumerate((29, 31, 35.5, 38)): #self.wait_to(t) self.play(FadeIn(ord_labels[i]), ShowCreation(ordinal_fin[i])) if i >= 2: self.play(FadeIn(card_labels[i])) #self.wait_to(41) self.play(ShowCreation(VGroup(ordinal_fin[4:], rate_func=rush_into))) omega = OrdinalOmega().highlight(BLUE) omega_src = omega.copy() omega_src.next_to(ordinal_fin, buff=1) omega_src.add_to_back(*ordinal_fin) label1 = VGroup(ord_labels[0], card_labels[0]) labels_to_fade = VGroup(list(zip(ord_labels[1:], card_labels[1:]))) labels_to_fade.save_state() for l, bar in zip(labels_to_fade, omega[1:4]): l.move_to(bar, coor_mask=X_MASK) l.highlight(BLACK) limit_bar = omega[0].copy().next_to(omega) limit_lord = TexMobject("\\omega_\\omega").highlight(BLUE).next_to( limit_bar, UP) limit_lcard = TexMobject("\\aleph_\\omega").highlight(RED).next_to( limit_bar, DOWN) limit_g = VGroup(limit_bar, limit_lord, limit_lcard) limit_g.next_to(omega, coor_mask=X_MASK) limit_g.save_state() limit_g.next_to(omega_src, coor_mask=X_MASK) self.play( MoveFromSaved(labels_to_fade), ReplacementTransform(omega_src, omega), Animation(label1), limit_g.restore, ) self.remove(labels_to_fade) #self.wait_to(52) plus1_bar = limit_bar.copy() plus1_label = TexMobject("\\omega_{\\omega+1}").highlight( BLUE).next_to(plus1_bar, UP) plus1_g = VGroup(plus1_bar, plus1_label) plus1_g.next_to(limit_g, coor_mask=X_MASK, buff=0.5) self.play(FadeIn(plus1_label), ShowCreation(plus1_bar)) #self.wait_to(55) omega_pow = make_ordinal_power(2, q=(0.8, 0.9, 0.9)).highlight(BLUE) omega_pow_src = omega_pow.copy() omega_pow_src.behind_edge(RIGHT) omega_pow_src[0].add_to_back(limit_bar, plus1_bar) omega_pow_src.add_to_back(omega) limit_g.remove(limit_bar) limit_g.save_state() plus1_label.save_state() limit_g.move_to(omega_pow[1][0], coor_mask=X_MASK) plus1_label.move_to(omega_pow[1][1], coor_mask=X_MASK).highlight(BLACK) pow_bar = limit_bar.copy() pow_label = TexMobject("\\omega_{\\omega\\cdot\\omega}").highlight( BLUE).next_to(pow_bar, UP) pow_g = VGroup(pow_bar, pow_label) pow_g.next_to(omega_pow, coor_mask=X_MASK, buff=-.2) pow_g.save_state() pow_g.next_to(omega_pow_src, coor_mask=X_MASK) self.play( MoveFromSaved(plus1_label), ReplacementTransform(omega_pow_src, omega_pow), MoveFromSaved(limit_g), pow_g.restore, ) self.remove(plus1_label) #self.wait_to(59) self.dither() labels_to_fade = VGroup(label1, limit_g, pow_label) labels_to_fade.save_state() labels_to_fade.highlight(BLACK) omega1 = Omega1(color=BLUE) omega1_bar = pow_bar.copy() omega1_label = TexMobject("\\omega_{\\omega_1}").highlight( BLUE).next_to(omega1_bar, UP) omega1_g = VGroup(omega1_bar, omega1_label) omega1_g.shift(omega1.line.get_end() - omega1_bar.get_center()) omega1_g.add(omega1.line) omega1_g.save_state() omega1_g.behind_edge(RIGHT) limit_g.move_to(omega1.bars[1][0], coor_mask=X_MASK) pow_label.move_to(omega1.bars[-1], coor_mask=X_MASK) pow_bar.save_state() pow_bar.scale(0) pow_bar.set_stroke(width=0) pow_bar.move_to(omega1.bars[-1]) self.play( MoveFromSaved(labels_to_fade, remover=True), omega1_g.restore, MoveFromSaved(pow_bar, remover=True), ReplacementTransform(omega_pow, omega1.bars), ) #self.wait_to(60+7.5) self.dither() ordinal_fin = OrdinalFinite(6, x1=SPACE_WIDTH + 1).highlight(BLUE) omega1.save_state() omega1.stretch_about_point(0, 0, ordinal_fin[0].get_center()) labels = VGroup([ TexMobject((i + 1) * "\\omega_{" + "\\omega_1" + (i + 1) * "}").next_to(bar, UP) for i, bar in enumerate(ordinal_fin[:3]) ]) labels.highlight(BLUE) next_bar = VGroup(labels[1], ordinal_fin[1]) next_bar.save_state() next_bar.shift(8 * RIGHT) self.play( MoveFromSaved(omega1, remover=True), next_bar.restore, ReplacementTransform(omega1_label, labels[0]), ReplacementTransform(omega1_bar, ordinal_fin[0]), ) #self.wait_to(60+11) self.play(FadeIn(labels[2]), ShowCreation(ordinal_fin[2])) #self.wait_to(60+13) self.play(ShowCreation(VGroup(ordinal_fin[3:]), rate_func=rush_into)) #self.wait_to(60+21.5) self.dither(2) conversation = Conversation(self) conversation.add_bubble("What about the union of all the ordinals?") self.play(FadeOut(VGroup(labels, ordinal_fin)), Animation(conversation.dialog))